Receives data on a socket.
fn recvfrom(sockfd: i32, buf: &mut [u8], flags: i32, src_addr: Option<&mut [u8]>, addrlen: &mut usize) -> i64
| Name | Description |
|---|---|
| sockfd | The socket on which to receive. |
| buf | The buffer into which the received data is placed. |
| flags | Flags used while receiving. |
| src_addr | An optional place where the address of the sender is placed. |
| addrlen | A place where the length of the senders address is placed. |
Returns the number of bytes received or an error value.