This routine converts a string to a NetworkAddress. If the string is an IP
address, no network traffic will be generated and the routine will not block.
If it is not, a DNS query will be issued, unless forbidden by the use_dns
parameter, in which case the query is guaranteed not to block.
The string to resolve, either an IP address or a hostname
The desired address family to return. By default, returns
the family that host is in. If a value is specified, this routine
will throw if the value found for host doesn't match this parameter.
Whether to use the DNS if host is not an IP address.
If false and host is not an IP, this routine will throw.
Defaults to true.
If use_dns is true, the Duration to use as timeout
for the DNS lookup.
In case of lookup failure, if family doesn't match host,
or if use_dns is false but host is not an IP.
See the parameter description for more details.