Function wasmer_wasix::syscalls::wasix::sock_recv::sock_recv

source ·
pub fn sock_recv<M: MemorySize>(
    ctx: FunctionEnvMut<'_, WasiEnv>,
    sock: Fd,
    ri_data: WasmPtr<__wasi_iovec_t<M>, M>,
    ri_data_len: M::Offset,
    ri_flags: RiFlags,
    ro_data_len: WasmPtr<M::Offset, M>,
    ro_flags: WasmPtr<RoFlags, M>,
) -> Result<Errno, WasiError>
Expand description

§sock_recv()

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.