nix::sys::socket

Function recvfrom

Source
pub fn recvfrom<T: SockaddrLike>(
    sockfd: RawFd,
    buf: &mut [u8],
) -> Result<(usize, Option<T>)>
Expand description

Receive data from a connectionless or connection-oriented socket. Returns the number of bytes read and, for connectionless sockets, the socket address of the sender.

Further reading