/usr/lib/swipl/library/ext/clib/socket.pl
All Application Manual Name SummaryHelp

  • ext
    • clib
      • socket.pl -- Network socket (TCP and UDP) library
        • socket_create/2
        • tcp_socket/1
        • unix_domain_socket/1
        • tcp_close_socket/1
        • tcp_open_socket/2
        • tcp_open_socket/3
        • tcp_bind/2
        • tcp_listen/2
        • tcp_accept/3
        • tcp_connect/2
        • rewrite_host/3
        • tcp_connect/4
        • tcp_connect/3
        • tcp_select/3
        • try_proxy/4
        • proxy_for_url/3
        • udp_socket/1
        • udp_receive/4
        • udp_send/4
        • tcp_setopt/2
        • tcp_fcntl/3
        • tcp_getopt/2
        • host_address/3
        • tcp_host_to_address/2
        • gethostname/1
        • ip_name/2
        • negotiate_socks_connection/2
      • uid.pl
      • unix.pl -- Unix specific operations
      • syslog.pl -- Unix syslog interface
      • memfile.pl
      • time.pl -- Time and alarm library
      • uri.pl -- Process URIs
      • filesex.pl -- Extended operations on files
      • uuid.pl -- Universally Unique Identifier (UUID) Library
      • sha.pl -- SHA secure hashes
      • process.pl -- Create processes and redirect I/O
      • hash_stream.pl -- Maintain a hash on a stream
      • md5.pl -- MD5 hashes
      • rlimit.pl
      • mallocinfo.pl -- Memory allocation details
      • prolog_stream.pl -- A stream with Prolog callbacks
      • streaminfo.pl
      • streampool.pl -- Input multiplexing
      • udp_broadcast.pl -- A UDP broadcast proxy
      • crypt.pl
      • cgi.pl -- Read CGI parameters
 host_address(+HostName, -Address, +Options) is nondet
host_address(-HostName, +Address, +Options) is det
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.