MCPcopy Create free account
hub / github.com/F-Stack/f-stack / anetFormatFdAddr

Function anetFormatFdAddr

app/redis-6.2.6/src/anet.c:599–605  ·  view source on GitHub ↗

Like anetFormatAddr() but extract ip and port from the socket's peer/sockname. */

Source from the content-addressed store, hash-verified

597
598/* Like anetFormatAddr() but extract ip and port from the socket's peer/sockname. */
599int anetFormatFdAddr(int fd, char *buf, size_t buf_len, int fd_to_str_type) {
600 char ip[INET6_ADDRSTRLEN];
601 int port;
602
603 anetFdToString(fd,ip,sizeof(ip),&port,fd_to_str_type);
604 return anetFormatAddr(buf, buf_len, ip, port);
605}

Callers 1

connFormatFdAddrFunction · 0.85

Calls 2

anetFdToStringFunction · 0.85
anetFormatAddrFunction · 0.85

Tested by

no test coverage detected