(sockfd: Fd)
| 425 | /// [glibc]: https://sourceware.org/glibc/manual/latest/html_node/Reading-Address.html |
| 426 | #[inline] |
| 427 | pub fn getsockname<Fd: AsFd>(sockfd: Fd) -> io::Result<SocketAddrAny> { |
| 428 | backend::net::syscalls::getsockname(sockfd.as_fd()) |
| 429 | } |
| 430 | |
| 431 | /// `getpeername(fd, addr, len)`—Returns the address a socket is connected |
| 432 | /// to. |