Name resolution v0.1.0

Source
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.

Source

Parameters

NameTypeDescription
allocatorAllocatorwhat the list is kept in
hostchar8[..]a host name, such as example.com, or a numeric address
portuint16the port every address gets

Returns: the addresses, or fails with NotFound when the name has none, or with the resolver's reason