Address specifiers

Prev:Networking examples
Next:Connection-oriented networking

The networking words are quite general and work with address specifiers rather than concrete concepts such as host names. There are four types of address specifiers.

Unix domain sockets:

<local> ( path -- addrspec )

Internet host name/port number pairs; the host name is resolved to an IPv4 or IPv6 address using the operating system's resolver:

<inet> ( host port -- inet )

IPv4 addresses, with no host name resolution:

<inet4> ( host port -- inet4 )

IPv6 addresses, with no host name resolution:

<inet6> ( host port -- inet6 )

While the inet addressing specifier is capable of performing name lookups when passed to <client>, sometimes it is necessary to look up a host name without making a connection:
resolve-host ( addrspec -- seq )