[nondet]host_address(+HostName,
-Address, +Options)
[det]host_address(-HostName,
+Address, +Options)Translate between a machines host-name and it's (IP-)address. Supported
options:
- domain(+Domain)
- One of
inet or inet6 to limit the results to
the given family.
- type(+Type)
- One of
stream or dgram.
- canonname(+Boolean)
- If
true (default false), return the canonical
host name in the frist answer
In mode (+,-,+) Address is unified to a dict with the
following keys:
- address
- A Prolog terms describing the ip address.
- domain
- One of
inet or inet6. The underlying getaddrinfo()
calls this family. We use domain for
consistency with
socket_create/2.
- type
- Currently one of
stream or dgram.
- host
- Available if
canonname(true) is specified on the first
returned address. Holds the official canonical host name.