Function wasmer_wasix::syscalls::wasix::sock_recv_from::sock_recv_from

source ·
pub fn sock_recv_from<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>,
    ro_addr: WasmPtr<__wasi_addr_port_t, M>,
) -> Result<Errno, WasiError>
Expand description

§sock_recv_from()

Receive a message and its peer address from a socket. Note: This is similar to recvfrom 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.