[det]tcp_host_to_address(?HostName,
?Address)Translate between a machines host-name and it's (IP-)address. If
HostName is an atom, it is resolved using getaddrinfo()
and the IP-number is unified to Address using a term of the
format
ip(Byte1,Byte2,Byte3,Byte4)
. Otherwise, if Address
is bound to an
ip(Byte1,Byte2,Byte3,Byte4)
term, it is resolved by gethostbyaddr()
and the canonical hostname is unified with HostName.
- deprecated
- New code should use host_address/3.
This version is bootstrapped from host_address/3
and only searches for IP4 addresses that support TCP connections.