X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/c61e69257af07a3e79b4c623ded540062daa156e..06851a93de54c4d9bb0a6c52234ef5bb3db07d96:/src/anet.h diff --git a/src/anet.h b/src/anet.h index 10db3d2f..406c5783 100644 --- a/src/anet.h +++ b/src/anet.h @@ -35,6 +35,10 @@ #define ANET_ERR -1 #define ANET_ERR_LEN 256 +#if defined(__sun) +#define AF_LOCAL AF_UNIX +#endif + int anetTcpConnect(char *err, char *addr, int port); int anetTcpNonBlockConnect(char *err, char *addr, int port); int anetUnixConnect(char *err, char *path); @@ -42,11 +46,13 @@ int anetUnixNonBlockConnect(char *err, char *path); int anetRead(int fd, char *buf, int count); int anetResolve(char *err, char *host, char *ipbuf); int anetTcpServer(char *err, int port, char *bindaddr); -int anetUnixServer(char *err, char *path); -int anetAccept(char *err, int serversock, char *ip, int *port); +int anetUnixServer(char *err, char *path, mode_t perm); +int anetTcpAccept(char *err, int serversock, char *ip, int *port); +int anetUnixAccept(char *err, int serversock); int anetWrite(int fd, char *buf, int count); int anetNonBlock(char *err, int fd); int anetTcpNoDelay(char *err, int fd); int anetTcpKeepAlive(char *err, int fd); +int anetPeerToString(int fd, char *ip, int *port); #endif