v / vlib / net
Raw file | 29 loc (22 sloc) | 404 bytes | Latest commit hash fd1b6efea
1module net
2
3#include <unistd.h>
4#include <sys/select.h>
5// inet.h is needed for inet_ntop on macos
6#include <arpa/inet.h>
7#include <netdb.h>
8#include <errno.h>
9#include <fcntl.h>
10
11#flag solaris -lsocket
12
13const is_windows = false
14
15fn error_code() int {
16 return C.errno
17}
18
19fn init() {
20}
21
22pub const (
23 msg_nosignal = 0x4000
24)
25
26const (
27 error_ewouldblock = C.EWOULDBLOCK
28 error_einprogress = C.EINPROGRESS
29)