Add anetTcp6Server() function.

Refactor the common code from anetTcpServer into internal function which
can be used by both anetTcpServer and anetTcp6Server.
This commit is contained in:
Geoff Garside
2011-09-19 23:32:41 +01:00
committed by antirez
parent f638236902
commit fd8a6ae7a6
2 changed files with 16 additions and 2 deletions

View File

@ -46,6 +46,7 @@ int anetUnixNonBlockConnect(char *err, char *path);
int anetRead(int fd, char *buf, int count);
int anetResolve(char *err, char *host, char *ipbuf, size_t ipbuf_len);
int anetTcpServer(char *err, int port, char *bindaddr);
int anetTcp6Server(char *err, int port, char *bindaddr);
int anetUnixServer(char *err, char *path, mode_t perm);
int anetTcpAccept(char *err, int serversock, char *ip, size_t ip_len, int *port);
int anetUnixAccept(char *err, int serversock);