5 #include "pipe/p_compiler.h"
7 #if defined(PIPE_SUBSYSTEM_WINDOWS_USER)
8 # define PIPE_HAVE_SOCKETS
9 #elif defined(PIPE_OS_LINUX) || defined(PIPE_OS_HAIKU) || defined(PIPE_OS_APPLE)
10 # define PIPE_HAVE_SOCKETS
13 boolean
u_socket_init(void);
14 void u_socket_stop(void);
15 void u_socket_close(int s
);
16 int u_socket_listen_on_port(uint16_t portnum
);
17 int u_socket_accept(int s
);
18 int u_socket_connect(const char *host
, uint16_t port
);
19 int u_socket_send(int s
, void *data
, size_t size
);
20 int u_socket_peek(int s
, void *data
, size_t size
);
21 int u_socket_recv(int s
, void *data
, size_t size
);
22 void u_socket_block(int s
, boolean block
);