Name resolution v0.1.0
The addresses a host name resolves to.
Resolve
pub func Resolve(
allocator: Allocator,
host: char8[..],
port: uint16
) -> Vector<SocketAddress> ! IoError
The addresses of host, each with port, in the order the resolver prefers them, without repeats.
A host that is a numeric IPv4 or IPv6 address gives just that address.
Parameters
| Name | Type | Description |
|---|---|---|
allocator | Allocator | what the list is kept in |
host | char8[..] | a host name, such as example.com, or a numeric address |
port | uint16 | the port every address gets |
Returns: the addresses, or fails with NotFound when the name has none, or with the resolver's reason