Function nix::sys::socket::recvmsg

source ·
pub fn recvmsg<'a, 'outer, 'inner, S>(
    fd: RawFd,
    iov: &'outer mut [IoSliceMut<'inner>],
    cmsg_buffer: Option<&'a mut Vec<u8>>,
    flags: MsgFlags,
) -> Result<RecvMsg<'a, 'outer, S>>
where S: SockaddrLike + 'a, 'inner: 'outer,
Expand description

Receive message in scatter-gather vectors from a socket, and optionally receive ancillary data into the provided buffer. If no ancillary data is desired, use () as the type parameter.

§Arguments

  • fd: Socket file descriptor
  • iov: Scatter-gather list of buffers to receive the message
  • cmsg_buffer: Space to receive ancillary data. Should be created by cmsg_space!
  • flags: Optional flags passed directly to the operating system.

§References

recvmsg(2)