Method lrs::socket::Socket::recv_msg

Receives a message, control messages, and the senders address.

Syntax

impl Socket {
    fn recv_msg(&self, buf: &mut [&mut [u8]], addr: &'a mut [u8], ctrl: &'b mut [u8], flags: MsgFlags) -> Result<(usize, Option<&'a mut SockAddr>, CMsgIter<'b>, MsgFlags), Errno>
}

Arguments

NameDescription
buf

The buffers in which the message will be stored.

addr

The buffer in which the address of the sender will be stored.

ctrl

The buffer in which the control messages will be stored.

flags

Flags that can change the behavior of the operation.

Return value

Returns the number of bytes received, the address of the sender, an iterator over the received control messages, and flags of the message.

See also