7 #include <sys/socket.h>
10 #define SOCKET_ERROR -1
int socket_t
Alias to differenciate between regular ints and socket fds.
socket_t open_socket_nodelay(const char *ip, short port)
Open a socket with TCP_NODELAY.
socket_t open_socket(const char *ip, short port)
Connect to a host:port couple.
socket_t open_socket_reuseaddr(const char *ip, short port)
Open a socket with SO_REUSEADDR.