Function rustix::net::getpeername

pub fn getpeername<Fd: AsFd>(sockfd: &Fd) -> io::Result<SocketAddrAny>
Documentation

getpeername(fd, addr, len)—Returns the address a socket is connected to.

References