src/server/util/socket.h

changeset 674
6a031133a498
parent 673
144bdc33fdb6
equal deleted inserted replaced
673:144bdc33fdb6 674:6a031133a498
43 43
44 // creates a socket and connects to localhost:<port> 44 // creates a socket and connects to localhost:<port>
45 // returns the socket fd 45 // returns the socket fd
46 int util_socket_connect_local(short port); 46 int util_socket_connect_local(short port);
47 47
48 // creates a connected socket pair (domain AF_UNIX, type SOCK_STREAM)
49 // returns 0 on success, -1 on error
50 int util_socketpair(int fds[2]);
51
48 // enables/disables non-blocking mode the for specified socket 52 // enables/disables non-blocking mode the for specified socket
49 int util_socket_setnonblock(int fd, int nonblock); 53 int util_socket_setnonblock(int fd, int nonblock);
50 54
51 55
52 #ifdef __cplusplus 56 #ifdef __cplusplus

mercurial