pub fn resolve<M: MemorySize>(
    ctx: FunctionEnvMut<'_, WasiEnv>,
    host: WasmPtr<u8, M>,
    host_len: M::Offset,
    port: u16,
    addrs: WasmPtr<__wasi_addr_t, M>,
    naddrs: M::Offset,
    ret_naddrs: WasmPtr<M::Offset, M>,
) -> Result<Errno, WasiError>Expand description
§resolve()
Resolves a hostname and a port to one or more IP addresses.
Note: This is similar to getaddrinfo in POSIX
When successful, the contents of the output buffer consist of a sequence of IPv4 and/or IPv6 addresses. Each address entry consists of a addr_t object. This function fills the output buffer as much as possible.
§Parameters
- host- Host to resolve
- port- Port hint (zero if no hint is supplied)
- addrs- The buffer where addresses will be stored
§Return
The number of IP addresses returned during the DNS resolution.