pub async fn lookup_host<R: Resolver>(
resolver: &R,
qname: impl ToDname,
) -> Result<FoundHosts<R>, Error>
Expand description
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
.
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.