summaryrefslogtreecommitdiff
path: root/ref/api/pipe.html
diff options
context:
space:
mode:
Diffstat (limited to 'ref/api/pipe.html')
-rw-r--r--ref/api/pipe.html18
1 files changed, 9 insertions, 9 deletions
diff --git a/ref/api/pipe.html b/ref/api/pipe.html
index 49d703ce..b70e4a11 100644
--- a/ref/api/pipe.html
+++ b/ref/api/pipe.html
@@ -269,7 +269,7 @@ accurate type checks in functions passing values of this type.</p>
However it is possible to access a pipe when more information about the
source of a message is needed, or when more control is required over message delivery.</p>
</div>
-<p>Pipe objects are created by <a href="../../TODO.html">dialers</a> and and <a href="../../TODO.html">listeners</a>.</p>
+<p>Pipe objects are created by <a href="../TODO.html">dialers</a> and and <a href="../TODO.html">listeners</a>.</p>
<h2 id="initialization"><a class="header" href="#initialization">Initialization</a></h2>
<p>A pipe may be initialized using the macro <a name="a004"></a><code>NNG_PIPE_INITIALIZER</code>
before it is opened, to prevent confusion with valid open pipes.</p>
@@ -288,7 +288,7 @@ Otherwise it returns <code>-1</code>.</p>
</p>
<p>A pipe is considered valid if it was ever created by the socket.
Pipes that are allocated on the stack or statically should be initialized with the macro
-<a href="../../api/pipe.html#initialization"><code>NNG_PIPE_INITIALIZER</code></a> to ensure that they cannot be confused with a valid pipe.</p>
+<a href="../api/pipe.html#initialization"><code>NNG_PIPE_INITIALIZER</code></a> to ensure that they cannot be confused with a valid pipe.</p>
</div>
<h2 id="closing-a-pipe"><a class="header" href="#closing-a-pipe">Closing a Pipe</a></h2>
<pre><code class="language-c">nng_err nng_pipe_close(nng_pipe p);
@@ -296,7 +296,7 @@ Pipes that are allocated on the stack or statically should be initialized with t
<p>The <a name="a006"></a><code>nng_pipe_close</code> function closes the supplied pipe, <em>p</em>.
Messages that have been submitted for sending may be flushed or delivered,
depending upon the transport.</p>
-<p>Further attempts to use the pipe after this call returns will result in <a href="../../api/errors.html#NNG_ECLOSED"><code>NNG_ECLOSED</code></a>.</p>
+<p>Further attempts to use the pipe after this call returns will result in <a href="../api/errors.html#NNG_ECLOSED"><code>NNG_ECLOSED</code></a>.</p>
<div class="mdbook-alerts mdbook-alerts-tip">
<p class="mdbook-alerts-title">
<span class="mdbook-alerts-icon"></span>
@@ -313,7 +313,7 @@ nng_socket nng_pipe_socket(nng_pipe p);
<p><a name="a007"></a>
<a name="a008"></a>
<a name="a009"></a>
-These functions return the <a href="../../TODO.html">socket</a>, <a href="../../TODO.html">dialer</a>, or <a href="../../TODO.html">listener</a> that created or owns the pipe.</p>
+These functions return the <a href="../TODO.html">socket</a>, <a href="../TODO.html">dialer</a>, or <a href="../TODO.html">listener</a> that created or owns the pipe.</p>
<p>If the pipe was does not have an associated dialer or listener, then the associated will
return [<code>NNG_DIALER_INITIALIZER</code>] or [<code>NNG_LISTENER_INITIALIZER</code>], as appropriate, and
either [<code>nng_dialer_id</code>] or [<code>nng_listener_id</code>] for the returned object will return -1.</p>
@@ -323,7 +323,7 @@ either [<code>nng_dialer_id</code>] or [<code>nng_listener_id</code>] for the re
note
</p>
<p>The socket, or the endpoint, returned by these functions may be in the process of closing,
-and might not be further usable as a result. (Other functions will result in <a href="../../api/errors.html#NNG_ECLOSED"><code>NNG_ECLOSED</code></a>.)</p>
+and might not be further usable as a result. (Other functions will result in <a href="../api/errors.html#NNG_ECLOSED"><code>NNG_ECLOSED</code></a>.)</p>
</div>
<h2 id="pipe-options"><a class="header" href="#pipe-options">Pipe Options</a></h2>
<pre><code class="language-c">nng_err nng_pipe_get_bool(nng_pipe p, const char *opt, bool *valp);
@@ -349,8 +349,8 @@ referenced by <em>valp</em>.</p>
<p>These functions access an option as a specific type. The transport layer will have details about which options
are available, and which type they may be accessed using.</p>
<p>In the case of <code>nng_pipe_get_string</code>, the underlying string may only be valid for as long as the pipe is valid.
-Thus, this function can only be safely called in a pipe event callback set up with <a href="../../api/pipe.html#pipe-notifications"><code>nng_pipe_notify</code></a>.</p>
-<p>The <code>nng_pipe_get_strdup</code> function is like <code>nng_pipe_get_string</code>, but makes a copy into a newly allocated buffer, so that the string must be freed by the caller using <a href="../../api/memory.html#free-string"><code>nng_strfree</code></a>.</p>
+Thus, this function can only be safely called in a pipe event callback set up with <a href="../api/pipe.html#pipe-notifications"><code>nng_pipe_notify</code></a>.</p>
+<p>The <code>nng_pipe_get_strdup</code> function is like <code>nng_pipe_get_string</code>, but makes a copy into a newly allocated buffer, so that the string must be freed by the caller using <a href="../api/memory.html#free-string"><code>nng_strfree</code></a>.</p>
<p>The <code>nng_pipe_get_strcpy</code> function is also like <code>nng_pipe_get_string</code>, but it makes a copy into a buffer
supplied by the caller. The buffer is passed in <em>val</em>, and the size of the buffer is passed in <em>len</em>.
The value of <em>len</em> must be large enough to hold the string and the terminating zero byte.</p>
@@ -377,7 +377,7 @@ Each event may have at most one callback registered.
Registering a callback implicitly unregisters any previously registered.</p>
<p>The following pipe events are supported:</p>
<div class="table-wrapper"><table><thead><tr><th>Event</th><th>Description</th></tr></thead><tbody>
-<tr><td><a name="a019"></a><code>NNG_PIPE_EV_ADD_PRE</code><a name="NNG_PIPE_EV_ADD_PRE"></a></td><td>This event occurs after a connection and negotiation has completed, but before the pipe is added to the socket. If the pipe is closed (using <a href="../../api/pipe.html#closing-a-pipe"><code>nng_pipe_close</code></a>) at this point, the socket will never see the pipe, and no further events will occur for the given pipe.</td></tr>
+<tr><td><a name="a019"></a><code>NNG_PIPE_EV_ADD_PRE</code><a name="NNG_PIPE_EV_ADD_PRE"></a></td><td>This event occurs after a connection and negotiation has completed, but before the pipe is added to the socket. If the pipe is closed (using <a href="../api/pipe.html#closing-a-pipe"><code>nng_pipe_close</code></a>) at this point, the socket will never see the pipe, and no further events will occur for the given pipe.</td></tr>
<tr><td><a name="a020"></a><code>NNG_PIPE_EV_ADD_POST</code><a name="NNG_PIPE_EV_ADD_POST"></a></td><td>This event occurs after the pipe is fully added to the socket. Prior to this time, it is not possible to communicate over the pipe with the socket.</td></tr>
<tr><td><a name="a021"></a><code>NNG_PIPE_EV_REM_POST</code><a name="NNG_PIPE_EV_REM_POST"></a></td><td>This event occurs after the pipe has been removed from the socket. The underlying transport may be closed at this point, and it is not possible communicate using this pipe.</td></tr>
</tbody></table>
@@ -395,7 +395,7 @@ Doing so would thus result in a deadlock.</p>
<span class="mdbook-alerts-icon"></span>
tip
</p>
-<p>The callback <em>cb</em> may close a pipe for any reason by simply closing it using <a href="../../api/pipe.html#closing-a-pipe"><code>nng_pipe_close</code></a>.
+<p>The callback <em>cb</em> may close a pipe for any reason by simply closing it using <a href="../api/pipe.html#closing-a-pipe"><code>nng_pipe_close</code></a>.
For example, this might be done to prevent an unauthorized peer from connecting to the socket,
if an authorization check made during <code>NNG_PIPE_EV_ADD_PRE</code> fails.</p>
</div>