Retrieves the address a socket is connected to.
fn getpeername(sockfd: i32, addr: &mut [u8], addrlen: &mut usize) -> i32
| Name | Description |
|---|---|
| sockfd | The socket. |
| addr | The buffer into which the address is placed. |
| addrlen | A place into which the length of the address is placed. |
Returns success or an error value.