From edced7d757bc3bfb98961e0d78695e4bedbb4561 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Mon, 22 Jan 2018 20:38:20 -0800 Subject: fixes #221 zerotier URL format changes We are adopting a more standard URL format for zerotier, and making more use of the URL parsing common layer. While here we updated the docs to reflect correctly the URI syntax we are using everywhere. --- docs/nng_inproc.adoc | 3 +-- docs/nng_ipc.adoc | 9 ++------- docs/nng_zerotier.adoc | 26 +++++++++++++------------- 3 files changed, 16 insertions(+), 22 deletions(-) (limited to 'docs') diff --git a/docs/nng_inproc.adoc b/docs/nng_inproc.adoc index 9ba30fae..47a088a5 100644 --- a/docs/nng_inproc.adoc +++ b/docs/nng_inproc.adoc @@ -46,8 +46,7 @@ URI Format ~~~~~~~~~~ This transport uses URIs using the scheme `inproc://`, followed by -an arbitrary string of text, terminated by a `NUL` byte. The -entire URI must be less than `NNG_MAXADDRLEN` bytes long. +an arbitrary string of text, terminated by a `NUL` byte. Multiple URIs can be used within the same application, and they will not interfere with one another. diff --git a/docs/nng_ipc.adoc b/docs/nng_ipc.adoc index 6367a681..c1fcd5c4 100644 --- a/docs/nng_ipc.adoc +++ b/docs/nng_ipc.adoc @@ -47,17 +47,12 @@ URI Format ~~~~~~~~~~ This transport uses URIs using the scheme `ipc://`, followed by -a path name in the file system where the socket or named pipe +a an absolute path name in the file system where the socket or named pipe should be created. TIP: On Windows, all names are prefixed by `\.\pipe\` and do not occupy the normal file system. On POSIX platforms, the path is -taken literally, and is relative to the current directory, unless -an extra leading `/` is provided. For example, `ipc://myname` refers -to the name `myname` in the current directory, whereas `ipc:///tmp/myname` -refers to `myname` located in `/tmp`. - -The entire URI must be less than `NNG_MAXADDRLEN` bytes long. +taken literally, and is relative to the root directory. Socket Address ~~~~~~~~~~~~~~ diff --git a/docs/nng_zerotier.adoc b/docs/nng_zerotier.adoc index 40ebabff..16bb647c 100644 --- a/docs/nng_zerotier.adoc +++ b/docs/nng_zerotier.adoc @@ -64,19 +64,19 @@ cannot be initialized for any reason. URI Format ~~~~~~~~~~ -This transport uses URIs using the scheme `zt://`, followed by a network -address (sixteen hexadecimal digits), followed by a `/` delimiter, -followed by the node number (ten hexadecimal digits) of the listening -node, followed by a service or port number (decimal value, up to 24-bits). -For example, the URI `zt://0123456789abdef/fedcba9876:999` indicates -that node fedcba9876 on network 0123456789abcdef listening on port 999. - -Listening nodes may use port 0, or `*`, to indicate that a suitable port -number be selected automatically. Applications using this must get the -selected port address using the `nng_listener_getopt` function. - -Listening nodes may also elide their own node number, as well as the -delimiter separating the node number. +This transport uses URIs using the scheme `zt://`, followed by a node +number (ten hexadecimal digits) followed by a `.` delimited, and then +a network address (sixteen hexadecimal digits), followed by a colon (`.`) +and service or port number (decimal value, up to 24-bits). +For example, the URI `zt://fedcba9876.0123456789abdef:999` indicates +that node fedcba9876 on network 0123456789abcdef is listening on port 999. + +The special value `*` can be used in lieu of a node number to represent +the node's own node number. + +Listeners may use port 0 to indicate that a suitable port +number be selected automatically. Applications using this must determine the +selected port number using the `nng_listener_getopt` function. Socket Address ~~~~~~~~~~~~~~ -- cgit v1.2.3-70-g09d2