2020-08-20 23:01:37 +02:00
|
|
|
module net
|
|
|
|
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
#include <sys/types.h>
|
2021-02-08 23:48:23 +01:00
|
|
|
#include <sys/un.h>
|
2020-08-20 23:01:37 +02:00
|
|
|
#include <sys/select.h>
|
|
|
|
#include <arpa/inet.h>
|
|
|
|
#include <netinet/in.h>
|
|
|
|
#include <netdb.h>
|
|
|
|
#include <errno.h>
|
|
|
|
#include <fcntl.h>
|
2021-01-20 11:11:01 +01:00
|
|
|
#flag solaris -lsocket
|
2021-02-08 23:48:23 +01:00
|
|
|
|
2020-08-20 23:01:37 +02:00
|
|
|
fn error_code() int {
|
|
|
|
return C.errno
|
|
|
|
}
|
|
|
|
|
|
|
|
fn init() {
|
|
|
|
}
|
|
|
|
|
|
|
|
pub const (
|
|
|
|
msg_nosignal = 0x4000
|
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
error_ewouldblock = C.EWOULDBLOCK
|
|
|
|
)
|