Module spin_sdk.wit.imports.wasi_sockets_ip_name_lookup_0_3_0
Global variables
var ErrorCode-
Lookup error codes.
Functions
async def resolve_addresses(name: str) ‑> List[IpAddress_Ipv4 | IpAddress_Ipv6]-
Expand source code
async def resolve_addresses(name: str) -> List[wasi_sockets_types_0_3_0.IpAddress]: """ 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: - <https://pubs.opengroup.org/onlinepubs/9699919799/functions/getaddrinfo.html> - <https://man7.org/linux/man-pages/man3/getaddrinfo.3.html> - <https://learn.microsoft.com/en-us/windows/win32/api/ws2tcpip/nf-ws2tcpip-getaddrinfo> - <https://man.freebsd.org/cgi/man.cgi?query=getaddrinfo&sektion=3> Raises: `componentize_py_types.Err(spin_sdk.wit.imports.wasi_sockets_ip_name_lookup_0_3_0.ErrorCode)` """ raise NotImplementedErrorResolve 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:
- https://pubs.opengroup.org/onlinepubs/9699919799/functions/getaddrinfo.html
- https://man7.org/linux/man-pages/man3/getaddrinfo.3.html
- https://learn.microsoft.com/en-us/windows/win32/api/ws2tcpip/nf-ws2tcpip-getaddrinfo
- https://man.freebsd.org/cgi/man.cgi?query=getaddrinfo&sektion=3
Raises:
componentize_py_types.Err(ErrorCode)
Classes
class ErrorCode_AccessDenied-
Expand source code
@dataclass class ErrorCode_AccessDenied: passErrorCode_AccessDenied()
class ErrorCode_InvalidArgument-
Expand source code
@dataclass class ErrorCode_InvalidArgument: passErrorCode_InvalidArgument()
class ErrorCode_NameUnresolvable-
Expand source code
@dataclass class ErrorCode_NameUnresolvable: passErrorCode_NameUnresolvable()
class ErrorCode_Other (value: str | None)-
Expand source code
@dataclass class ErrorCode_Other: value: Optional[str]ErrorCode_Other(value: Optional[str])
Instance variables
var value : str | None
class ErrorCode_PermanentResolverFailure-
Expand source code
@dataclass class ErrorCode_PermanentResolverFailure: passErrorCode_PermanentResolverFailure()
class ErrorCode_TemporaryResolverFailure-
Expand source code
@dataclass class ErrorCode_TemporaryResolverFailure: passErrorCode_TemporaryResolverFailure()