Function wasmer_wasix::syscalls::wasix::sock_connect::sock_connect

source ·
pub fn sock_connect<M: MemorySize>(
    ctx: FunctionEnvMut<'_, WasiEnv>,
    sock: Fd,
    addr: WasmPtr<__wasi_addr_port_t, M>,
) -> Result<Errno, WasiError>
Expand description

§sock_connect()

Initiate a connection on a socket to the specified address

Polling the socket handle will wait for data to arrive or for the socket status to change which can be queried via ‘sock_status’

Note: This is similar to connect in POSIX

§Parameters

  • fd - Socket descriptor
  • addr - Address of the socket to connect to