Method lrs::socket::Socket::get_peer_addr

Retrieves the address of the peer this socket is connected to, if any.

Syntax

impl Socket {
    fn get_peer_addr(&self, buf: &'a mut [u8]) -> Result<&'a mut SockAddr, Errno>
}

Arguments

NameDescription
buf

The buffer in which the address will be stored.

Return value

Returns the address of the peer this socket is connected to, if any.

See also