Function wasmer_wasix::syscalls::wasix::sock_addr_peer::sock_addr_peer

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

§sock_addr_peer()

Returns the remote address to which the socket is connected to.

Note: This is similar to getpeername 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