[][src]Function domain_resolv::lookup::host::lookup_host

pub fn lookup_host<R: Resolver, N: ToDname>(
    resolver: &R,
    name: &N
) -> LookupHost<R>

Creates a future that resolves a host name into its IP addresses.

The future will use the resolver given in resolv to query the DNS for the IPv4 and IPv6 addresses associated with name. If name is a relative domain name, it is being translated into a series of absolute names according to the resolver’s configuration.

The value returned upon success can be turned into an iterator over IP addresses or even socket addresses. Since the lookup may determine that the host name is in fact an alias for another name, the value will also return the canonical name.