Function
resolve-addresses
Resolve an internet host name to a list of IP addresses.
Unicode domain names are automatically converted to ASCII using IDNA encoding. If the input is an IP address string, the address is parsed and returned as-is without making any external requests.
See the wasi-socket proposal README.md for a comparison with getaddrinfo.
The results are returned in connection order preference.
This function never succeeds with 0 results. It either fails or succeeds with at least one address. Additionally, this function never returns IPv4-mapped IPv6 addresses.
References:
resolve-addresses: async func(name: string) -> result<list<ip-address>, error-code>;