2020-08-21 00:01:37 +03:00
|
|
|
module net
|
|
|
|
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <sys/select.h>
|
2021-05-22 10:53:19 +03:00
|
|
|
// inet.h is needed for inet_ntop on macos
|
2020-08-21 00:01:37 +03:00
|
|
|
#include <arpa/inet.h>
|
|
|
|
#include <netdb.h>
|
|
|
|
#include <errno.h>
|
|
|
|
#include <fcntl.h>
|
2021-05-22 10:53:19 +03:00
|
|
|
|
2021-01-20 13:11:01 +03:00
|
|
|
#flag solaris -lsocket
|
2021-02-09 01:48:23 +03:00
|
|
|
|
2022-08-07 10:40:05 +03:00
|
|
|
const is_windows = false
|
|
|
|
|
2020-08-21 00:01:37 +03:00
|
|
|
fn error_code() int {
|
|
|
|
return C.errno
|
|
|
|
}
|
|
|
|
|
|
|
|
fn init() {
|
|
|
|
}
|
|
|
|
|
|
|
|
pub const (
|
|
|
|
msg_nosignal = 0x4000
|
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
error_ewouldblock = C.EWOULDBLOCK
|
2022-08-07 10:40:05 +03:00
|
|
|
error_einprogress = C.EINPROGRESS
|
2020-08-21 00:01:37 +03:00
|
|
|
)
|