Accepts a new connection on the socket and returns the peer's address.
impl Socket {
fn accept_addr(&self, addr: &'a mut [u8], flags: SockFlags) -> Result<(Result<&'a mut SockAddr, Errno>, Socket), Errno>
}| Name | Description |
|---|---|
| addr | A buffer in which the address of the peer will be stored. |
| flags | The flags that will be set on the returned socket. |
If the address buffer is too small, and in particular if the address buffer is empty, the address of the peer will not be returned. It can still be obtained afterwards with the get_peer_addr method.
The flags argument will be used to construct the new socket, similar to how they are used in the constructors of the socket type.