aboutsummaryrefslogtreecommitdiff
path: root/docs/man/nng_tcp.7.adoc
diff options
context:
space:
mode:
Diffstat (limited to 'docs/man/nng_tcp.7.adoc')
-rw-r--r--docs/man/nng_tcp.7.adoc14
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/man/nng_tcp.7.adoc b/docs/man/nng_tcp.7.adoc
index aa90364e..7b9b6823 100644
--- a/docs/man/nng_tcp.7.adoc
+++ b/docs/man/nng_tcp.7.adoc
@@ -45,6 +45,20 @@ TCP port number.(((port number, TCP)))
For example, to contact port 80 on the localhost either of the following URIs
could be used: `tcp://127.0.0.1:80` or `tcp://localhost:80`.
+A URI may be restricted to IPv6 using the scheme `tcp6://`, and may
+be restricted to IPv4 using the scheme `tcp4://`.
+
+NOTE: Specifying `tcp6://` may not prevent IPv4 hosts from being used with
+IPv4-in-IPv6 addresses, particularly when using a wildcard hostname with
+listeners.
+The details of varies across operating systems.
+
+NOTE: Both `tcp6://` and `tcp4://` are _nng_ extensions, and will not
+be understood by other implementations such as _libnanomsg_.
+
+TIP: We recommend using either numeric IP addresses, or names that are
+specific to either IPv4 or IPv6 to prevent confusion and surprises.
+
When specifying IPv6 addresses, the address must be enclosed in
square brackets (`[]`) to avoid confusion with the final colon
separating the port.