MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / anetFormatFdAddr

Function anetFormatFdAddr

src/anet.c:608–614  ·  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

606
607/* Like anetFormatAddr() but extract ip and port from the socket's peer/sockname. */
608int anetFormatFdAddr(int fd, char *buf, size_t buf_len, int fd_to_str_type) {
609 char ip[INET6_ADDRSTRLEN];
610 int port;
611
612 anetFdToString(fd,ip,sizeof(ip),&port,fd_to_str_type);
613 return anetFormatAddr(buf, buf_len, ip, port);
614}

Callers 1

connFormatFdAddrFunction · 0.85

Calls 2

anetFdToStringFunction · 0.85
anetFormatAddrFunction · 0.85

Tested by

no test coverage detected