pub fn sock_addr_local<M: MemorySize>(
    ctx: FunctionEnvMut<'_, WasiEnv>,
    sock: Fd,
    ret_addr: WasmPtr<__wasi_addr_port_t, M>,
) -> Errno
Expand description

§sock_addr_local()

Returns the local address to which the socket is bound.

Note: This is similar to getsockname in POSIX

When successful, the contents of the output buffer consist of an IP address, either IP4 or IP6.

§Parameters

  • fd - Socket that the address is bound to