Like anetFormatAddr() but extract ip and port from the socket's peer/sockname. */
| 597 | |
| 598 | /* Like anetFormatAddr() but extract ip and port from the socket's peer/sockname. */ |
| 599 | int 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 | } |
no test coverage detected