From 79afcea91aa6882eede47b5cddc4f097454b6027 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sat, 8 Aug 2020 14:02:52 -0700 Subject: fixes #1279 Add support for ws4:// and ws6:// style websocket urls fixes #1277 FreeBSD errors due to bad v4 vs. v6 assumptions --- docs/man/nng_ws.7.adoc | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/man/nng_ws.7.adoc b/docs/man/nng_ws.7.adoc index 5dedbeb8..18baedfa 100644 --- a/docs/man/nng_ws.7.adoc +++ b/docs/man/nng_ws.7.adoc @@ -1,6 +1,6 @@ = nng_ws(7) // -// Copyright 2018 Staysail Systems, Inc. +// Copyright 2020 Staysail Systems, Inc. // Copyright 2018 Capitar IT Group BV // // This document is supplied under the terms of the MIT License, a @@ -58,6 +58,20 @@ Secure WebSockets (((WebSockets, Secure)))(((URI, `wss://`))) (if enabled) use the scheme `wss://`, and the default TCP port number of 443. Otherwise the format is the same as for regular WebSockets. +A URI may be restricted to IPv6 using the scheme `ws6://` or `wss6://`, and may +be restricted to IPv4 using the scheme `ws4://` or `wss4://`. + +NOTE: Specifying `ws6://` or `wss6://` may not prevent IPv4 hosts from being used with +IPv4-in-IPv6 addresses, particularly when using a wildcard hostname with +listeners. +The details of this varies across operating systems. + +NOTE: The `ws4://` , `ws6://`, `wss4://` and `wss6://` schemes are specific to _NNG_, +and might not be understood by other implementations. + +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. -- cgit v1.2.3-70-g09d2