Function recv
pub fn recv<Fd>(
fd: Fd,
buf: &mut [u8],
flags: RecvFlags,
) -> Result<usize, Errno> ⓘwhere
Fd: AsFd,
Available on crate feature
dep_rustix
only.Expand description
recv(fd, buf, flags)
—Reads data from a socket.
This takes a &mut [u8]
which Rust requires to contain initialized memory.
To use an uninitialized buffer, use recv_uninit
.