Removes an address from the local port.
port_addr_remove() function is used to remove an address from the local port. This removes the specified IP address from the list of addresses that the port is bound to.
;;; Removes an address from the local port (@interface func (export "port_addr_remove") ;;; Address to be removed (param $addr (@witx const_pointer $addr)) (result $error (expected (error $errno))) )
ctx: A mutable reference to the function environment.
ip: A WebAssembly pointer to a
__wasi_addr_tstructure that represents the IP address to be removed.
The function returns a
Result indicating the outcome of the operation. If the operation is successful,
Ok(Errno::Success) is returned. If an error occurs, an appropriate
WasiError is returned.
port_addr_remove()function removes the specified IP address from the list of addresses that the local port is bound to.
__wasi_addr_tstructure represents an IP address. It contains a single field
ipfor the IP address.
- The behavior and limitations of the
port_addr_remove()function may vary depending on the specific runtime environment and underlying networking implementation. It is important to consult the documentation or specifications of the specific environment to understand its behavior in that context.