diff options
| author | Garrett D'Amore <garrett@damore.org> | 2020-11-09 14:33:15 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-09 14:33:15 -0800 |
| commit | 09bf59112e559c3addba3dc22ea864324a1d24be (patch) | |
| tree | aed29cb3869b8f7a76d7179ded484a97421ddb95 | |
| parent | 8cc32138eb0f6681507213df35ab0508028aed6e (diff) | |
| download | nng-09bf59112e559c3addba3dc22ea864324a1d24be.tar.gz nng-09bf59112e559c3addba3dc22ea864324a1d24be.tar.bz2 nng-09bf59112e559c3addba3dc22ea864324a1d24be.zip | |
Manual page updates for tip (#1333)
Co-authored-by: Staysail Systems, Inc <info@staysail.tech>
| -rw-r--r-- | man/tip/_toc.html | 2 | ||||
| -rw-r--r-- | man/tip/index.html | 8 | ||||
| -rw-r--r-- | man/tip/libnng.3.html | 4 | ||||
| -rw-r--r-- | man/tip/nng_ipc.7.html | 77 | ||||
| -rw-r--r-- | man/tip/nng_sockaddr.5.html | 37 | ||||
| -rw-r--r-- | man/tip/nng_sockaddr_abstract.5.html | 127 | ||||
| -rw-r--r-- | man/tip/nng_sockaddr_in6.5.html | 9 | ||||
| -rw-r--r-- | man/tip/nng_sockaddr_ipc.5.html | 43 | ||||
| -rw-r--r-- | man/tip/nng_thread_set_name.3supp.html | 78 | ||||
| -rw-r--r-- | man/tip/nng_ws.7.html | 109 |
10 files changed, 458 insertions, 36 deletions
diff --git a/man/tip/_toc.html b/man/tip/_toc.html index c62d8b3d..c2135fc8 100644 --- a/man/tip/_toc.html +++ b/man/tip/_toc.html @@ -283,6 +283,7 @@ <li><a href="nng_random.3supp.html">nng_random</a></li> <li><a href="nng_thread_create.3supp.html">nng_thread_create</a></li> <li><a href="nng_thread_destroy.3supp.html">nng_thread_destroy</a></li> +<li><a href="nng_thread_set_name.3supp.html">nng_thread_set_name</a></li> </ul> <li>Supplemental TLS Functions </li> @@ -315,6 +316,7 @@ <li><a href="nng_options.5.html">nng_options</a></li> <li><a href="nng_pipe.5.html">nng_pipe</a></li> <li><a href="nng_sockaddr.5.html">nng_sockaddr</a></li> +<li><a href="nng_sockaddr_abstract.5.html">nng_sockaddr_abstract</a></li> <li><a href="nng_sockaddr_in.5.html">nng_sockaddr_in</a></li> <li><a href="nng_sockaddr_in6.5.html">nng_sockaddr_in6</a></li> <li><a href="nng_sockaddr_inproc.5.html">nng_sockaddr_inproc</a></li> diff --git a/man/tip/index.html b/man/tip/index.html index 24e759d8..5829d252 100644 --- a/man/tip/index.html +++ b/man/tip/index.html @@ -1195,6 +1195,10 @@ mutual exclusion locks, threading, time keeping, and similar needs.</p> <td class="tableblock halign-left valign-top"><p class="tableblock"><a href="nng_thread_destroy.3supp.html">nng_thread_destroy(3supp)</a></p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">reap thread</p></td> </tr> +<tr> +<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="nng_thread_set_name.3supp.html">nng_thread_set_name(3supp)</a></p></td> +<td class="tableblock halign-left valign-top"><p class="tableblock">set thread name</p></td> +</tr> </tbody> </table> </div> @@ -1356,6 +1360,10 @@ applications need will use.</p> <td class="tableblock halign-left valign-top"><p class="tableblock">socket address</p></td> </tr> <tr> +<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="nng_sockaddr_abstract.5.html">nng_sockaddr_abstract(5)</a></p></td> +<td class="tableblock halign-left valign-top"><p class="tableblock">abstract IPC socket address</p></td> +</tr> +<tr> <td class="tableblock halign-left valign-top"><p class="tableblock"><a href="nng_sockaddr_in.5.html">nng_sockaddr_in(5)</a></p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">IPv4 socket address</p></td> </tr> diff --git a/man/tip/libnng.3.html b/man/tip/libnng.3.html index a4d6a875..99c4ec95 100644 --- a/man/tip/libnng.3.html +++ b/man/tip/libnng.3.html @@ -837,6 +837,10 @@ as a convenience to aid in creating portable applications.</p> <td class="tableblock halign-left valign-top"><p class="tableblock"><a href="nng_thread_destroy.3supp.html">nng_thread_destroy()</a></p></td> <td class="tableblock halign-left valign-top"><p class="tableblock">reap thread</p></td> </tr> +<tr> +<td class="tableblock halign-left valign-top"><p class="tableblock"><a href="nng_thread_set_name.3supp.html">nng_thread_set_name()</a></p></td> +<td class="tableblock halign-left valign-top"><p class="tableblock">set thread name</p></td> +</tr> </tbody> </table> </div> diff --git a/man/tip/nng_ipc.7.html b/man/tip/nng_ipc.7.html index 1aa55e92..ed2c43cc 100644 --- a/man/tip/nng_ipc.7.html +++ b/man/tip/nng_ipc.7.html @@ -42,7 +42,9 @@ no extra steps to use it should be necessary.</p> </div> </div> <div class="sect2"> -<h3 id="_uri_format">URI Format</h3> +<h3 id="_uri_formats">URI Formats</h3> +<div class="sect3"> +<h4 id="_traditional_names">Traditional Names</h4> <div class="paragraph"> <p>(URI, <code>ipc://</code>) This transport uses URIs using the scheme <code>ipc://</code>, followed by a path @@ -89,7 +91,7 @@ whenever possible. </td> <td class="content"> If compatibility with legacy <em>nanomsg</em> applications is required, -then pathnames must not be longer than 122 bytes, including the final +then path names must not be longer than 122 bytes, including the final <code>NUL</code> byte. This is because legacy versions of <em>nanomsg</em> cannot express URLs longer than 128 bytes, including the <code>ipc://</code> prefix. @@ -98,11 +100,80 @@ longer than 128 bytes, including the <code>ipc://</code> prefix. </table> </div> </div> +<div class="sect3"> +<h4 id="_unix_aliases">UNIX Aliases</h4> +<div class="paragraph"> +<p>(URI, <code>unix://</code>) +The <code>unix://</code> scheme is an alias for <code>ipc://</code> and can be used inter-changeably, but only +on POSIX systems.</p> +</div> +<div class="paragraph"> +<p>The purpose of this scheme is to support a future transport making use of <code>AF_UNIX</code> +on Windows systems, at which time it will be necessary to discriminate between +the Named Pipes and the <code>AF_UNIX</code> based transports.</p> +</div> +</div> +<div class="sect3"> +<h4 id="_abstract_names">Abstract Names</h4> +<div class="paragraph"> +<p>(URI, <code>abstract://</code>) +On Linux, this transport also can support abstract sockets. +Abstract sockets use a URI-encoded name after the scheme, which allows arbitrary values to be conveyed +in the path, including embedded <code>NUL</code> bytes. +For example, the name <code>"a\0b"</code> would be represented as <code>abstract://a%00b</code>.</p> +</div> +<div class="admonitionblock tip"> +<table> +<tr> +<td class="icon"> +<i class="fa icon-tip" title="Tip"></i> +</td> +<td class="content"> +An empty name may be used with a listener to request “auto bind” be used to select a name. +In this case the system will allocate a free name. +The name assigned may be retrieved using <code>NNG_OPT_LOCADDR</code>. +</td> +</tr> +</table> +</div> +<div class="admonitionblock note"> +<table> +<tr> +<td class="icon"> +<i class="fa icon-note" title="Note"></i> +</td> +<td class="content"> +<em>NNG</em> cannot represent an abstract socket with the empty name. +</td> +</tr> +</table> +</div> +<div class="admonitionblock note"> +<table> +<tr> +<td class="icon"> +<i class="fa icon-note" title="Note"></i> +</td> +<td class="content"> +Abstract names do not include the leading <code>NUL</code> byte used in the low-level socket address. +</td> +</tr> +</table> +</div> +<div class="paragraph"> +<p>Abstract sockets do not have any representation in the file system, and are automatically freed by +the system when no longer in use. +Abstract sockets ignore socket permissions, but it is still possible to determine the credentials +of the peer with <code>NNG_OPT_PEER_UID</code>, etc.</p> +</div> +</div> +</div> <div class="sect2"> <h3 id="_socket_address">Socket Address</h3> <div class="paragraph"> <p>When using an <a href="nng_sockaddr.5.html"><code>nng_sockaddr</code></a> structure, -the actual structure is of type <a href="nng_sockaddr_ipc.5.html"><code>nng_sockaddr_ipc</code></a>.</p> +the actual structure is of type <a href="nng_sockaddr_ipc.5.html"><code>nng_sockaddr_ipc</code></a>, +except for abstract sockets, which use <a href="nng_sockaddr_abstract.5.html"><code>nng_sockaddr_abstract</code></a>.</p> </div> </div> <div class="sect2"> diff --git a/man/tip/nng_sockaddr.5.html b/man/tip/nng_sockaddr.5.html index 4897e271..467da3b4 100644 --- a/man/tip/nng_sockaddr.5.html +++ b/man/tip/nng_sockaddr.5.html @@ -19,21 +19,23 @@ layout: manpage_v2 <pre class="pygments highlight"><code data-lang="c"><span class="tok-cp">#include</span> <span class="tok-cpf"><nng/nng.h></span><span class="tok-cp"> </span><span class="tok-cp"></span> <span class="tok-k">typedef</span> <span class="tok-k">union</span> <span class="tok-n">nng_sockaddr</span> <span class="tok-p">{</span> - <span class="tok-n">uint16_t</span> <span class="tok-n">s_family</span><span class="tok-p">;</span> - <span class="tok-n">nng_sockaddr_ipc</span> <span class="tok-n">s_ipc</span><span class="tok-p">;</span> - <span class="tok-n">nng_sockaddr_inproc</span> <span class="tok-n">s_inproc</span><span class="tok-p">;</span> - <span class="tok-n">nng_sockaddr_in</span> <span class="tok-n">s_in</span><span class="tok-p">;</span> - <span class="tok-n">nng_sockaddr_in6</span> <span class="tok-n">s_in6</span><span class="tok-p">;</span> - <span class="tok-n">nng_sockaddr_zt</span> <span class="tok-n">s_zt</span><span class="tok-p">;</span> + <span class="tok-n">uint16_t</span> <span class="tok-n">s_family</span><span class="tok-p">;</span> + <span class="tok-n">nng_sockaddr_ipc</span> <span class="tok-n">s_ipc</span><span class="tok-p">;</span> + <span class="tok-n">nng_sockaddr_inproc</span> <span class="tok-n">s_inproc</span><span class="tok-p">;</span> + <span class="tok-n">nng_sockaddr_in</span> <span class="tok-n">s_in</span><span class="tok-p">;</span> + <span class="tok-n">nng_sockaddr_in6</span> <span class="tok-n">s_in6</span><span class="tok-p">;</span> + <span class="tok-n">nng_sockaddr_zt</span> <span class="tok-n">s_zt</span><span class="tok-p">;</span> + <span class="tok-n">nng_sockaddr_abstract</span> <span class="tok-n">s_abstract</span><span class="tok-p">;</span> <span class="tok-p">}</span> <span class="tok-n">nng_sockaddr</span><span class="tok-p">;</span> <span class="tok-k">enum</span> <span class="tok-n">sockaddr_family</span> <span class="tok-p">{</span> - <span class="tok-n">NNG_AF_UNSPEC</span> <span class="tok-o">=</span> <span class="tok-mi">0</span><span class="tok-p">,</span> - <span class="tok-n">NNG_AF_INPROC</span> <span class="tok-o">=</span> <span class="tok-mi">1</span><span class="tok-p">,</span> - <span class="tok-n">NNG_AF_IPC</span> <span class="tok-o">=</span> <span class="tok-mi">2</span><span class="tok-p">,</span> - <span class="tok-n">NNG_AF_INET</span> <span class="tok-o">=</span> <span class="tok-mi">3</span><span class="tok-p">,</span> - <span class="tok-n">NNG_AF_INET6</span> <span class="tok-o">=</span> <span class="tok-mi">4</span><span class="tok-p">,</span> - <span class="tok-n">NNG_AF_ZT</span> <span class="tok-o">=</span> <span class="tok-mi">5</span><span class="tok-p">,</span> + <span class="tok-n">NNG_AF_UNSPEC</span> <span class="tok-o">=</span> <span class="tok-mi">0</span><span class="tok-p">,</span> + <span class="tok-n">NNG_AF_INPROC</span> <span class="tok-o">=</span> <span class="tok-mi">1</span><span class="tok-p">,</span> + <span class="tok-n">NNG_AF_IPC</span> <span class="tok-o">=</span> <span class="tok-mi">2</span><span class="tok-p">,</span> + <span class="tok-n">NNG_AF_INET</span> <span class="tok-o">=</span> <span class="tok-mi">3</span><span class="tok-p">,</span> + <span class="tok-n">NNG_AF_INET6</span> <span class="tok-o">=</span> <span class="tok-mi">4</span><span class="tok-p">,</span> + <span class="tok-n">NNG_AF_ZT</span> <span class="tok-o">=</span> <span class="tok-mi">5</span><span class="tok-p">,</span> + <span class="tok-n">NNG_AF_ABSTRACT</span> <span class="tok-o">=</span> <span class="tok-mi">6</span> <span class="tok-p">};</span></code></pre> </div> </div> @@ -121,6 +123,14 @@ specific member should be used.</p> <p>Address for ZeroTier transport (<a href="nng_zerotier.7.html">nng_zerotier(7)</a>). The <code>s_zt</code> member is valid.</p> </td> </tr> +<tr> +<td class="hdlist1"> +<code>NNG_AF_ABSTRACT</code> +</td> +<td class="hdlist2"> +<p>Address for an abstract UNIX domain socket. The <code>s_abstract</code> member is valid.</p> +</td> +</tr> </table> </div> <div class="paragraph"> @@ -132,7 +142,8 @@ specific member should be used.</p> <h2 id="_see_also">SEE ALSO</h2> <div class="sectionbody"> <div class="paragraph text-left"> -<p><a href="nng_sockaddr_in.5.html">nng_sockaddr_in(5)</a>, +<p><a href="nng_sockaddr_abstract.5.html">nng_sockaddr_abstract(5)</a>, +<a href="nng_sockaddr_in.5.html">nng_sockaddr_in(5)</a>, <a href="nng_sockaddr_in6.5.html">nng_sockaddr_in6(5)</a>, <a href="nng_sockaddr_inproc.5.html">nng_sockaddr_inproc(5)</a>, <a href="nng_sockaddr_ipc.5.html">nng_sockaddr_ipc(5)</a>, diff --git a/man/tip/nng_sockaddr_abstract.5.html b/man/tip/nng_sockaddr_abstract.5.html new file mode 100644 index 00000000..1eec3a30 --- /dev/null +++ b/man/tip/nng_sockaddr_abstract.5.html @@ -0,0 +1,127 @@ +--- +version: tip +layout: manpage_v2 +--- +<h1>nng_sockaddr_abstract(5)</h1> +<div class="sect1"> +<h2 id="_name">NAME</h2> +<div class="sectionbody"> +<div class="paragraph"> +<p>nng_sockaddr_abstract - abstract IPC socket address</p> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_synopsis">SYNOPSIS</h2> +<div class="sectionbody"> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="c"><span class="tok-cp">#include</span> <span class="tok-cpf"><nng/nng.h></span><span class="tok-cp"> +</span><span class="tok-cp"></span> +<span class="tok-k">enum</span> <span class="tok-n">sockaddr_family</span> <span class="tok-p">{</span> + <span class="tok-n">NNG_AF_ABSTRACT</span> <span class="tok-o">=</span> <span class="tok-mi">6</span><span class="tok-p">,</span> +<span class="tok-p">};</span> + +<span class="tok-k">typedef</span> <span class="tok-k">struct</span> <span class="tok-p">{</span> + <span class="tok-n">uint16_t</span> <span class="tok-n">sa_family</span><span class="tok-p">;</span> + <span class="tok-n">uint16_t</span> <span class="tok-n">sa_len</span><span class="tok-p">;</span> + <span class="tok-kt">char</span> <span class="tok-n">sa_name</span><span class="tok-p">[</span><span class="tok-mi">107</span><span class="tok-p">];</span> +<span class="tok-p">}</span> <span class="tok-n">nng_sockaddr_abstract</span><span class="tok-p">;</span></code></pre> +</div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_description">DESCRIPTION</h2> +<div class="sectionbody"> +<div class="paragraph"> +<p> An <code>nng_sockaddr_abstract</code> is the flavor of <a href="nng_sockaddr.5.html"><code>nng_sockaddr</code></a> +used to represent addresses associated with IPC communication using “abstract” sockets.</p> +</div> +<div class="paragraph"> +<p>Abstract sockets are only supported on Linux at present. +These sockets have a name that is simply an array of bytes, with no special meaning. +Abstract sockets also have no presence in the file system, do not honor any permissions, and are automatically +cleaned up by the operating system when no longer in use.</p> +</div> +<div class="admonitionblock note"> +<table> +<tr> +<td class="icon"> +<i class="fa icon-note" title="Note"></i> +</td> +<td class="content"> +Support for abstract sockets is a new feature in <em>NNG</em>, and it is only available on Linux. +As such their use is not recommended for portable applications. +</td> +</tr> +</table> +</div> +<div class="paragraph"> +<p>The following structure members are present:</p> +</div> +<div class="dlist"> +<dl> +<dt class="hdlist1"><code>sa_family</code></dt> +<dd> +<p>This field will always have the value <code>NNG_AF_ABSTRACT</code>.</p> +</dd> +<dt class="hdlist1"><code>sa_len</code></dt> +<dd> +<p>This field provides the name of the length stored in <code>sa_name</code>.</p> +</dd> +<dt class="hdlist1"><code>sa_name</code></dt> +<dd> +<p>This field holds the name of the abstract socket. +The bytes of name can have any value, including zero.</p> +</dd> +</dl> +</div> +<div class="admonitionblock note"> +<table> +<tr> +<td class="icon"> +<i class="fa icon-note" title="Note"></i> +</td> +<td class="content"> +The name does <em>not</em> include the leading <code>NUL</code> byte used on Linux to discriminate between +abstract and path name sockets. +</td> +</tr> +</table> +</div> +<div class="sect2"> +<h3 id="_auto_bind">Auto Bind</h3> +<div class="paragraph"> +<p>An empty value (<code>sa_len</code> equal to zero) can be used on listening sockets to request the +system allocate a name. +On Linux systems, this will result in a name with either 5 or 8 hexadecimal ASCII characters. +The name chosen can be obtained by retrieving the <code>NNG_OPT_LOCADDR</code> option on the listening entity.</p> +</div> +<div class="admonitionblock note"> +<table> +<tr> +<td class="icon"> +<i class="fa icon-note" title="Note"></i> +</td> +<td class="content"> +Because a zero length name is used to indicate auto bind be used, it is impossible to specify +an actual empty name. This name are not supported by <em>NNG</em>, although the underlying system can support it. +The use of that name is inadvisable anyway. +</td> +</tr> +</table> +</div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_see_also">SEE ALSO</h2> +<div class="sectionbody"> +<div class="paragraph text-left"> +<p><a href="nng_sockaddr.5.html">nng_sockaddr(5)</a>, +<a href="nng_ipc.7.html">nng_ipc(7)</a> +<a href="nng.7.html">nng(7)</a></p> +</div> +</div> +</div> diff --git a/man/tip/nng_sockaddr_in6.5.html b/man/tip/nng_sockaddr_in6.5.html index 5013666f..6799d385 100644 --- a/man/tip/nng_sockaddr_in6.5.html +++ b/man/tip/nng_sockaddr_in6.5.html @@ -26,6 +26,7 @@ layout: manpage_v2 <span class="tok-n">uint16_t</span> <span class="tok-n">sa_family</span><span class="tok-p">;</span> <span class="tok-n">uint16_t</span> <span class="tok-n">sa_port</span><span class="tok-p">;</span> <span class="tok-n">uint8_t</span> <span class="tok-n">sa_addr</span><span class="tok-p">[</span><span class="tok-mi">16</span><span class="tok-p">];</span> + <span class="tok-n">uint32_t</span> <span class="tok-n">sa_scope</span><span class="tok-p">;</span> <span class="tok-p">}</span> <span class="tok-n">nng_sockaddr_in6</span><span class="tok-p">;</span></code></pre> </div> </div> @@ -63,6 +64,14 @@ for IPv4 addresses.</p> <p>This field holds the IP address in network-byte order.</p> </dd> +<dt class="hdlist1"><code>sa_scope</code></dt> +<dd> +<p>This is the scope, and is typically used with link local + addresses to identify a specific interface. The details of + this are specific to the operating system. This value is + presented identically to the underlying system’s, including + any byte order considerations.</p> +</dd> </dl> </div> <div class="admonitionblock tip"> diff --git a/man/tip/nng_sockaddr_ipc.5.html b/man/tip/nng_sockaddr_ipc.5.html index c2ad0cdb..90e9b04c 100644 --- a/man/tip/nng_sockaddr_ipc.5.html +++ b/man/tip/nng_sockaddr_ipc.5.html @@ -24,7 +24,7 @@ layout: manpage_v2 <span class="tok-k">typedef</span> <span class="tok-k">struct</span> <span class="tok-p">{</span> <span class="tok-n">uint16_t</span> <span class="tok-n">sa_family</span><span class="tok-p">;</span> - <span class="tok-n">uint16_t</span> <span class="tok-n">sa_path</span><span class="tok-p">[</span><span class="tok-mi">128</span><span class="tok-p">];</span> + <span class="tok-kt">char</span> <span class="tok-n">sa_path</span><span class="tok-p">[</span><span class="tok-mi">128</span><span class="tok-p">];</span> <span class="tok-p">}</span> <span class="tok-n">nng_sockaddr_ipc</span><span class="tok-p">;</span></code></pre> </div> </div> @@ -34,9 +34,8 @@ layout: manpage_v2 <h2 id="_description">DESCRIPTION</h2> <div class="sectionbody"> <div class="paragraph"> -<p>An <code>nng_sockaddr_ipc</code> is the flavor of <a href="nng_sockaddr.5.html"><code>nng_sockaddr</code></a> -used to represent addresses associated with IPC communication -using the <a href="nng_ipc.7.html"><em>ipc</em></a> transport.</p> +<p> An <code>nng_sockaddr_ipc</code> is the flavor of <a href="nng_sockaddr.5.html"><code>nng_sockaddr</code></a> +used to represent addresses associated with IPC communication using the <a href="nng_ipc.7.html"><em>ipc</em></a> transport.</p> </div> <div class="paragraph"> <p>The following structure members are present:</p> @@ -49,12 +48,9 @@ using the <a href="nng_ipc.7.html"><em>ipc</em></a> transport.</p> </dd> <dt class="hdlist1"><code>sa_path</code></dt> <dd> -<p>This field holds the C string corresponding to path name where the - IPC socket is located. - For systems using UNIX domain sockets, this will be an absolute - path name in the file system, where the UNIX domain socket is located. - For Windows systems, this is the path name of the Named Pipe, without - the leading <code>\\.pipe\</code> portion, which will be automatically added.</p> +<p>This field holds the C string corresponding to path name where the IPC socket is located. +For systems using UNIX domain sockets, this will be a path name in the file system, where the UNIX domain socket is located. +For Windows systems, this is the path name of the Named Pipe, without the leading <code>\\.pipe\</code> portion, which will be automatically added.</p> </dd> </dl> </div> @@ -65,7 +61,7 @@ using the <a href="nng_ipc.7.html"><em>ipc</em></a> transport.</p> <i class="fa icon-note" title="Note"></i> </td> <td class="content"> -At this time, there is no support for Linux abstract sockets. +At this time, there is no support for abstract sockets. </td> </tr> </table> @@ -77,11 +73,22 @@ At this time, there is no support for Linux abstract sockets. <i class="fa icon-tip" title="Tip"></i> </td> <td class="content"> -In order to ensure maximum compatibility, applications should avoid -hard coding the size of the <code>sa_path</code> member explicitly, but use the +In order to ensure maximum compatibility, applications should avoid hard coding the size of the <code>sa_path</code> member explicitly, but use the <code>sizeof</code> operator to determine its actual size at compile time. -Furthermore, the size is guaranteed to be at least 128, but paths of -this length may not be supported on all systems. +Furthermore, the size is guaranteed to be at least 128, but paths of this length may not be supported on all systems. +</td> +</tr> +</table> +</div> +<div class="admonitionblock tip"> +<table> +<tr> +<td class="icon"> +<i class="fa icon-tip" title="Tip"></i> +</td> +<td class="content"> +Portable applications should restrict themselves to path names of not more than 90 bytes. Most systems have +limits around 100 bytes, but at least one system (HP-UX) is restricted to not more than 92 bytes including the <code>NUL</code>. </td> </tr> </table> @@ -93,11 +100,9 @@ this length may not be supported on all systems. <i class="fa icon-note" title="Note"></i> </td> <td class="content"> -If compatibility with legacy <em>nanomsg</em> applications is required, -then pathnames must not be longer than 122 bytes, including the final +If compatibility with legacy <em>nanomsg</em> applications is required, then path names must not be longer than 122 bytes, including the final <code>NUL</code> byte. -This is because legacy versions of <em>nanomsg</em> cannot express URLs -longer than 128 bytes, including the <code>ipc://</code> prefix. +This is because legacy versions of <em>nanomsg</em> cannot express URLs longer than 128 bytes, including the <code>ipc://</code> prefix. </td> </tr> </table> diff --git a/man/tip/nng_thread_set_name.3supp.html b/man/tip/nng_thread_set_name.3supp.html new file mode 100644 index 00000000..2738d5d1 --- /dev/null +++ b/man/tip/nng_thread_set_name.3supp.html @@ -0,0 +1,78 @@ +--- +version: tip +layout: manpage_v2 +--- +<h1>nng_thread_set_name(3supp)</h1> +<div class="sect1"> +<h2 id="_name">NAME</h2> +<div class="sectionbody"> +<div class="paragraph"> +<p>nng_thread_set_name - set thread name</p> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_synopsis">SYNOPSIS</h2> +<div class="sectionbody"> +<div class="listingblock"> +<div class="content"> +<pre class="pygments highlight"><code data-lang="c"><span class="tok-cp">#include</span> <span class="tok-cpf"><nng/nng.h></span><span class="tok-cp"> +</span><span class="tok-cp">#include</span> <span class="tok-cpf"><nng/supplemental/util/platform.h></span><span class="tok-cp"> +</span><span class="tok-cp"></span> +<span class="tok-kt">void</span> <span class="tok-nf">nng_set_thread_name</span><span class="tok-p">(</span><span class="tok-n">nng_thread</span> <span class="tok-o">*</span><span class="tok-kr">thread</span><span class="tok-p">,</span> <span class="tok-k">const</span> <span class="tok-kt">char</span> <span class="tok-o">*</span><span class="tok-n">name</span><span class="tok-p">);</span></code></pre> +</div> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_description">DESCRIPTION</h2> +<div class="sectionbody"> +<div class="paragraph"> +<p>The <code>nng_thread_set_name()</code> function attempts to set the name for the <em>thread</em> to <em>name</em>.</p> +</div> +<div class="paragraph"> +<p>If <em>thread</em> is <code>NULL</code>, then the name is set for the current thread.</p> +</div> +<div class="paragraph"> +<p>Support for this, and how names are exposed, varies between platform implementations. +This function is intended to facilitate debugging applications that may have many threads.</p> +</div> +<div class="admonitionblock tip"> +<table> +<tr> +<td class="icon"> +<i class="fa icon-tip" title="Tip"></i> +</td> +<td class="content"> +Internal threads created by <em>NNG</em> will have names beginning with <code>nng:</code>. +</td> +</tr> +</table> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_return_values">RETURN VALUES</h2> +<div class="sectionbody"> +<div class="paragraph"> +<p>None.</p> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_errors">ERRORS</h2> +<div class="sectionbody"> +<div class="paragraph"> +<p>None.</p> +</div> +</div> +</div> +<div class="sect1"> +<h2 id="_see_also">SEE ALSO</h2> +<div class="sectionbody"> +<div class="paragraph text-left"> +<p><a href="nng_thread_create.3supp.html">nng_thread_create(3supp)</a>, +<a href="nng.7.html">nng(7)</a></p> +</div> +</div> +</div> diff --git a/man/tip/nng_ws.7.html b/man/tip/nng_ws.7.html index b31496d8..dd252cc5 100644 --- a/man/tip/nng_ws.7.html +++ b/man/tip/nng_ws.7.html @@ -68,6 +68,51 @@ port 80 on localhost, with the path <code>/app/pubsub</code>.</p> Otherwise the format is the same as for regular WebSockets.</p> </div> <div class="paragraph"> +<p>A URI may be restricted to IPv6 using the scheme <code>ws6://</code> or <code>wss6://</code>, and may +be restricted to IPv4 using the scheme <code>ws4://</code> or <code>wss4://</code>.</p> +</div> +<div class="admonitionblock note"> +<table> +<tr> +<td class="icon"> +<i class="fa icon-note" title="Note"></i> +</td> +<td class="content"> +Specifying <code>ws6://</code> or <code>wss6://</code> 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. +</td> +</tr> +</table> +</div> +<div class="admonitionblock note"> +<table> +<tr> +<td class="icon"> +<i class="fa icon-note" title="Note"></i> +</td> +<td class="content"> +The <code>ws4://</code> , <code>ws6://</code>, <code>wss4://</code> and <code>wss6://</code> schemes are specific to <em>NNG</em>, +and might not be understood by other implementations. +</td> +</tr> +</table> +</div> +<div class="admonitionblock tip"> +<table> +<tr> +<td class="icon"> +<i class="fa icon-tip" title="Tip"></i> +</td> +<td class="content"> +We recommend using either numeric IP addresses, or names that are +specific to either IPv4 or IPv6 to prevent confusion and surprises. +</td> +</tr> +</table> +</div> +<div class="paragraph"> <p>When specifying IPv6 addresses, the address must be enclosed in square brackets (<code>[]</code>) to avoid confusion with the final colon separating the port.</p> @@ -157,7 +202,7 @@ only available for <code>wss://</code> endpoints. <dl> <dt class="hdlist1"><code>NNG_OPT_WS_REQUEST_HEADERS</code></dt> <dd> -<p>(string) Concentation of multiple lines terminated +<p>(string) Concatenation of multiple lines terminated by CRLF sequences, that can be used to add further headers to the HTTP request sent when connecting. This option can be set on dialers, and retrieved from pipes.</p> @@ -169,6 +214,68 @@ by CRLF sequences, that can be used to add further headers to the HTTP response sent when connecting. This option can be set on listeners, and retrieved from pipes.</p> </dd> +<dt class="hdlist1"><code>NNG_OPT_WS_RECV_TEXT</code></dt> +<dd> +<p>(bool) Enable receiving of TEXT frames at the WebSocket layer. +This option should only be used with the low level +<a href="nng_stream.5.html"><code>nng_stream</code></a> API. +When set, the stream will accept in-bound TEXT frames as well as BINARY frames.</p> +</dd> +</dl> +</div> +<div class="admonitionblock note"> +<table> +<tr> +<td class="icon"> +<i class="fa icon-note" title="Note"></i> +</td> +<td class="content"> +The SP protocols (such as <a href="nng_req.7.html">REQ</a>) require BINARY frames as they pass binary protocol data. +Hence this option should not be used with such protocols. +</td> +</tr> +</table> +</div> +<div class="admonitionblock note"> +<table> +<tr> +<td class="icon"> +<i class="fa icon-note" title="Note"></i> +</td> +<td class="content"> +RFC 6455 requires that TEXT frames be discarded and the connection closed if the frame does not contain valid UTF-8 data. +NNG does not perform any such validation. +Applications that need to be strictly conformant should check for this themselves. +</td> +</tr> +</table> +</div> +<div class="dlist"> +<dl> +<dt class="hdlist1"><code>NNG_OPT_WS_SEND_TEXT</code></dt> +<dd> +<p>(bool) Enable sending of TEXT frames at the WebSocket layer. +This option should only be used with the low level +<a href="nng_stream.5.html"><code>nng_stream</code></a> API. +When set, the stream will send TEXT frames instead of BINARY frames.</p> +</dd> +</dl> +</div> +<div class="admonitionblock note"> +<table> +<tr> +<td class="icon"> +<i class="fa icon-note" title="Note"></i> +</td> +<td class="content"> +NNG does not check the frame data, and will attempt to send whatever the client requests. +Peers that are compliant with RFC 6455 will discard TEXT frames (and break the connection) if they do not contain valid UTF-8. +</td> +</tr> +</table> +</div> +<div class="dlist"> +<dl> <dt class="hdlist1"><code>NNG_OPT_TLS_CONFIG</code></dt> <dd> <p>(<code>nng_tls_config *</code>) The underlying TLS |
