8 #include <sys/socket.h>
9 #include <netinet/in.h>
11 #include <arpa/inet.h>
13 typedef struct socket_st Socket;
15 extern Socket *socket_serve_tcp( const char *hname, int port, int backlog );
16 extern Socket *socket_accept( const Socket *listen_sock );
17 extern Socket *socket_new();
18 extern const char *socket_query_remote_name( Socket *sock );
19 extern int socket_query_fd( const Socket *sock );
20 extern void socket_dest( Socket *sock );
21 extern Socket **socket_unix_pair( int type );
22 extern void socket_unix_pair_dest( Socket **sockpair );
23 extern Socket *socket_connect( const char *remote_name, int remote_port );
24 extern int socket_set_nonblock( Socket *sock );
25 extern void socket_zero( Socket *sock );