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