mirror of
https://github.com/fluencelabs/redis
synced 2025-06-13 17:21:20 +00:00
Use getaddrinfo(3) in anetResolve. #apichange
Change anetResolve() function to use getaddrinfo(3) to resolve hostnames. Resolved hostnames are limited to those reachable by the AF_INET address family. API Change: anetResolve requires additional argument. additional argument required to specify the length of the character buffer the IP address is written to in order to comply with inet_ntop(3) function semantics. inet_ntop(3) replaces inet_ntoa(3) as it has been designed to be compatible with more address families.
This commit is contained in:
@ -44,7 +44,7 @@ int anetTcpNonBlockConnect(char *err, char *addr, int port);
|
||||
int anetUnixConnect(char *err, char *path);
|
||||
int anetUnixNonBlockConnect(char *err, char *path);
|
||||
int anetRead(int fd, char *buf, int count);
|
||||
int anetResolve(char *err, char *host, char *ipbuf);
|
||||
int anetResolve(char *err, char *host, char *ipbuf, size_t ipbuf_len);
|
||||
int anetTcpServer(char *err, int port, char *bindaddr);
|
||||
int anetUnixServer(char *err, char *path, mode_t perm);
|
||||
int anetTcpAccept(char *err, int serversock, char *ip, int *port);
|
||||
|
Reference in New Issue
Block a user