wasi

Function sock_recv

Source
pub unsafe fn sock_recv(
    fd: Fd,
    ri_data: IovecArray<'_>,
    ri_flags: Riflags,
) -> Result<(Size, Roflags), Errno>
Expand description

Receive a message from a socket. Note: This is similar to recv in POSIX, though it also supports reading the data into multiple buffers in the manner of readv.

§Parameters

  • ri_data - List of scatter/gather vectors to which to store data.
  • ri_flags - Message flags.

§Return

Number of bytes stored in ri_data and message flags.