diff options
| author | Garrett D'Amore <garrett@damore.org> | 2025-01-14 08:26:14 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2025-01-14 08:26:14 -0800 |
| commit | 6dc757342f5f9dedf38de356ae1802546f976bcc (patch) | |
| tree | 87d931b409abcd6f4975c5742592b6d3464f24de /docs | |
| parent | 1b1f4609c6dad724b88dfb069b2260341e582906 (diff) | |
| download | nng-6dc757342f5f9dedf38de356ae1802546f976bcc.tar.gz nng-6dc757342f5f9dedf38de356ae1802546f976bcc.tar.bz2 nng-6dc757342f5f9dedf38de356ae1802546f976bcc.zip | |
docs: pipe documentation
While here addressed some minor issues with http docs as well.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/man/nng_pipe.5.adoc | 79 | ||||
| -rw-r--r-- | docs/man/nng_pipe_close.3.adoc | 52 | ||||
| -rw-r--r-- | docs/man/nng_pipe_dialer.3.adoc | 47 | ||||
| -rw-r--r-- | docs/man/nng_pipe_id.3.adoc | 50 | ||||
| -rw-r--r-- | docs/man/nng_pipe_listener.3.adoc | 47 | ||||
| -rw-r--r-- | docs/man/nng_pipe_notify.3.adoc | 93 | ||||
| -rw-r--r-- | docs/man/nng_pipe_socket.3.adoc | 46 | ||||
| -rw-r--r-- | docs/ref/SUMMARY.md | 2 | ||||
| -rw-r--r-- | docs/ref/api/http.md | 1 | ||||
| -rw-r--r-- | docs/ref/api/index.md | 1 | ||||
| -rw-r--r-- | docs/ref/api/pipe.md | 157 | ||||
| -rw-r--r-- | docs/ref/xref.md | 28 |
12 files changed, 184 insertions, 419 deletions
diff --git a/docs/man/nng_pipe.5.adoc b/docs/man/nng_pipe.5.adoc deleted file mode 100644 index 79530dfd..00000000 --- a/docs/man/nng_pipe.5.adoc +++ /dev/null @@ -1,79 +0,0 @@ -= nng_pipe(5) -// -// Copyright 2020 Staysail Systems, Inc. <info@staysail.tech> -// Copyright 2018 Capitar IT Group BV <info@capitar.com> -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -== NAME - -nng_pipe - communications pipe - -== SYNOPSIS - -[source, c] ----- -#include <nng/nng.h> - -typedef struct nng_pipe_s nng_pipe; ----- - -== DESCRIPTION - -(((pipe)))(((connection))) -An `nng_pipe` is a handle to a pipe object, which can be thought of as a single -connection. -(In most cases this is actually the case -- the pipe is an abstraction for a -single TCP or IPC connection.) -Pipes are associated with either the listener or dialer that created them, -and therefore are also automatically associated with a single socket. - -IMPORTANT: The `nng_pipe` structure is always passed by value (both -for input parameters and return values), and should be treated opaquely. -Passing structures this way gives the compiler a chance to perform -accurate type checks in functions passing values of this type. - -TIP: Most applications should never concern themselves with individual pipes. -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. - -Pipe objects are created by dialers (xref:nng_dialer.5.adoc[`nng_dialer`] objects) -and listeners (xref:nng_listener.5.adoc[`nng_listener`] objects). - -Pipe objects may be destroyed by the -xref:nng_pipe_close.3.adoc[`nng_pipe_close()`] function. -They are also closed when the dialer or listener that created them is closed, -or when the remote peer closes the underlying connection. - -[[NNG_PIPE_INITIALIZER]] -=== Initialization - -A pipe may be initialized using the macro `NNG_PIPE_INITIALIZER` -before it is opened, to prevent confusion with valid open pipes. - -For example: - -[source, c] ----- -nng_pipe p = NNG_PIPE_INITIALIZER; ----- - -== SEE ALSO - -[.text-left] -xref:nng_msg_get_pipe.3.adoc[nng_msg_get_pipe(3)], -xref:nng_pipe_close.3.adoc[nng_pipe_close(3)], -xref:nng_pipe_get.3.adoc[nng_pipe_get(3)], -xref:nng_pipe_dialer.3.adoc[nng_pipe_dialer(3)], -xref:nng_pipe_id.3.adoc[nng_pipe_id(3)], -xref:nng_pipe_listener.3.adoc[nng_pipe_listener(3)], -xref:nng_pipe_socket.3.adoc[nng_pipe_socket(3)], -xref:nng_dialer.5.adoc[nng_dialer(5)], -xref:nng_listener.5.adoc[nng_listener(5)], -xref:nng_options.5.adoc[nng_options(5)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/man/nng_pipe_close.3.adoc b/docs/man/nng_pipe_close.3.adoc deleted file mode 100644 index a8de660f..00000000 --- a/docs/man/nng_pipe_close.3.adoc +++ /dev/null @@ -1,52 +0,0 @@ -= nng_pipe_close(3) -// -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> -// Copyright 2018 Capitar IT Group BV <info@capitar.com> -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -== NAME - -nng_pipe_close - close pipe - -== SYNOPSIS - -[source, c] ----- -#include <nng/nng.h> - -int nng_pipe_close(nng_pipe p); ----- - -== DESCRIPTION - -The `nng_pipe_close()` function closes the supplied pipe, _p_. -Messages that have been submitted for sending may be flushed or delivered, -depending upon the transport. - -Further attempts to use the pipe after this call returns will result -in `NNG_ECLOSED`. - -TIP: Pipes are automatically closed when their creator closes, or when the -remote peer closes the underlying connection. - -== RETURN VALUES - -This function returns 0 on success, and non-zero otherwise. - -== ERRORS - -[horizontal] -`NNG_ECLOSED`:: The pipe _p_ is already closed or was never opened. - -== SEE ALSO - -[.text-left] -xref:nng_strerror.3.adoc[nng_strerror(3)], -xref:nng_options.5.adoc[nng_options(5)], -xref:nng_pipe.5.adoc[nng_pipe(5)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/man/nng_pipe_dialer.3.adoc b/docs/man/nng_pipe_dialer.3.adoc deleted file mode 100644 index c2a68c5e..00000000 --- a/docs/man/nng_pipe_dialer.3.adoc +++ /dev/null @@ -1,47 +0,0 @@ -= nng_pipe_dialer(3) -// -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> -// Copyright 2018 Capitar IT Group BV <info@capitar.com> -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -== NAME - -nng_pipe_dialer - return dialer that created pipe - -== SYNOPSIS - -[source, c] ----- -#include <nng/nng.h> - -nng_dialer nng_pipe_dialer(nng_pipe p); ----- - -== DESCRIPTION - -The `nng_pipe_dialer()` function returns the xref:nng_dialer.5.adoc[`nng_dialer`] -that created the pipe _p_. -If the pipe was not created by a dialer, then the returned value will -have an identifier (xref:nng_dialer_id.3.adoc[`nng_dialer_id()`]) of `-1`. - -== RETURN VALUES - -This function returns the dialer that created the pipe, unless it was -not created by a dialer, in which case a value initialized with -`NNG_DIALER_INITIALIZER` will be returned. - -== ERRORS - -None. - -== SEE ALSO - -[.text-left] -xref:nng_pipe.5.adoc[nng_pipe(5)], -xref:nng_dialer.5.adoc[nng_dialer(5)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/man/nng_pipe_id.3.adoc b/docs/man/nng_pipe_id.3.adoc deleted file mode 100644 index 9b8e8ee6..00000000 --- a/docs/man/nng_pipe_id.3.adoc +++ /dev/null @@ -1,50 +0,0 @@ -= nng_pipe_id(3) -// -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> -// Copyright 2018 Capitar IT Group BV <info@capitar.com> -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -== NAME - -nng_pipe_id - return numeric pipe identifier - -== SYNOPSIS - -[source, c] ----- -#include <nng/nng.h> - -int nng_pipe_id(nng_pipe p); ----- - -== DESCRIPTION - -The `nng_pipe_id()` function returns a positive identifier for the pipe _p_, -if it is valid. -Otherwise it returns `-1`. - -NOTE: 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 -xref:nng_pipe.5.adoc#NNG_PIPE_INITIALIZER[`NNG_PIPE_INITIALIZER`] to ensure that -they cannot be confused with a valid pipe. - -== RETURN VALUES - -This function returns the positive value for the pipe identifier, or -`-1` if the pipe is invalid. - -== ERRORS - -None. - -== SEE ALSO - -[.text-left] -xref:nng_pipe.5.adoc[nng_pipe(5)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/man/nng_pipe_listener.3.adoc b/docs/man/nng_pipe_listener.3.adoc deleted file mode 100644 index 78ae0500..00000000 --- a/docs/man/nng_pipe_listener.3.adoc +++ /dev/null @@ -1,47 +0,0 @@ -= nng_pipe_listener(3) -// -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> -// Copyright 2018 Capitar IT Group BV <info@capitar.com> -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -== NAME - -nng_pipe_listener - return listener that created pipe - -== SYNOPSIS - -[source, c] ----- -#include <nng/nng.h> - -nng_listener nng_pipe_listener(nng_pipe p); ----- - -== DESCRIPTION - -The `nng_pipe_listener()` function returns the xref:nng_listener.5.adoc[`nng_listener`] -that created the pipe _p_. -If the pipe was not created by a listener, then the returned value will -have an identifier (xref:nng_listener_id.3.adoc[`nng_listener_id()`]) of `-1`. - -== RETURN VALUES - -This function returns the listener that created the pipe, unless it was -not created by a listener, in which case a value initialized with -`NNG_LISTENER_INITIALIZER` will be returned. - -== ERRORS - -None. - -== SEE ALSO - -[.text-left] -xref:nng_pipe.5.adoc[nng_pipe(5)], -xref:nng_listener.5.adoc[nng_listener(5)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/man/nng_pipe_notify.3.adoc b/docs/man/nng_pipe_notify.3.adoc deleted file mode 100644 index cd7250f7..00000000 --- a/docs/man/nng_pipe_notify.3.adoc +++ /dev/null @@ -1,93 +0,0 @@ -= nng_pipe_notify(3) -// -// Copyright 2019 Staysail Systems, Inc. <info@staysail.tech> -// Copyright 2018 Capitar IT Group BV <info@capitar.com> -// Copyright 2019 Devolutions <info@devolutions.net> -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -== NAME - -nng_pipe_notify - register pipe notification callback - -== SYNOPSIS - -[source, c] ----- -#include <nng/nng.h> - -typedef enum { - NNG_PIPE_EV_ADD_PRE, - NNG_PIPE_EV_ADD_POST, - NNG_PIPE_EV_REM_POST, -} nng_pipe_ev; - -typedef void (*nng_pipe_cb)(nng_pipe, nng_pipe_ev, void *); - -int nng_pipe_notify(nng_socket s, nng_pipe_ev ev, nng_pipe_cb cb, void *arg); ----- - -== DESCRIPTION - -The `nng_pipe_notify()` function registers the callback function _cb_ -to be called whenever a xref:nng_pipe.5.adoc[pipe] the pipe event specified by -_ev_ occurs on the socket _s_. -The callback _cb_ will be passed _arg_ as its final argument. - -A different callback may be supplied for each event. -Each event may have at most one callback registered. -Registering a callback implicitly unregisters any previously registered. - -The following pipe events are supported: - -`NNG_PIPE_EV_ADD_PRE`:: 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 xref:nng_pipe_close.3.adoc[`nng_pipe_close()`]) at -this point, the socket will never see the pipe, and no further events will -occur for the given pipe. - -`NNG_PIPE_EV_ADD_POST`:: 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. - -`NNG_PIPE_EV_REM_POST`:: 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. - -WARNING: The callback _cb_ function must *not* attempt to perform any -accesses to the socket, as it is called with a lock on the socket held! -Doing so would thus result in a deadlock. - -TIP: The callback _cb_ may close a pipe for any reason by simply closing -it using xref:nng_pipe_close.3.adoc[`nng_pipe_close()`]. -This might be done before the pipe is added to the socket (during -`NNG_PIPE_EV_ADD_PRE`), for example, if the remote peer is not authorized. - -TIP: It is possible to register the same _cb_ and _arg_ for different events -by calling this function separately for different values of _ev_. - -NOTE: This function ignores invalid values for _ev_. - -== RETURN VALUES - -This function returns 0 on success, and non-zero otherwise. - -== ERRORS - -[horizontal] -`NNG_ECLOSED`:: The socket _s_ does not refer to an open socket. - -== SEE ALSO - -[.text-left] -xref:nng_pipe_close.3.adoc[nng_pipe_close(3)], -xref:nng_pipe_get.3.adoc[nng_pipe_get(3)], -xref:nng_pipe.5.adoc[nng_pipe(5)], -xref:nng_socket.5.adoc[nng_socket(5)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/man/nng_pipe_socket.3.adoc b/docs/man/nng_pipe_socket.3.adoc deleted file mode 100644 index 755ed776..00000000 --- a/docs/man/nng_pipe_socket.3.adoc +++ /dev/null @@ -1,46 +0,0 @@ -= nng_pipe_socket(3) -// -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> -// Copyright 2018 Capitar IT Group BV <info@capitar.com> -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -== NAME - -nng_pipe_socket - return owning socket for pipe - -== SYNOPSIS - -[source, c] ----- -#include <nng/nng.h> - -nng_socket nng_pipe_socket(nng_pipe p); ----- - -== DESCRIPTION - -The `nng_pipe_socket()` function returns the xref:nng_socket.5.adoc[`nng_socket`] -associated with the pipe _p_. - -NOTE: The returned socket may be closed or in the process of closing, in -which case it will not be usable with other functions. - -== RETURN VALUES - -This function returns the socket associated with the pipe. - -== ERRORS - -None. - -== SEE ALSO - -[.text-left] -xref:nng_pipe.5.adoc[nng_pipe(5)], -xref:nng_socket.5.adoc[nng_socket(5)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/ref/SUMMARY.md b/docs/ref/SUMMARY.md index 1c5ad2a5..fe05512f 100644 --- a/docs/ref/SUMMARY.md +++ b/docs/ref/SUMMARY.md @@ -14,6 +14,8 @@ - [Contexts](./api/ctx.md) + - [Pipes](./api/pipe.md) + - [Memory](./api/memory.md) - [Time](./api/time.md) diff --git a/docs/ref/api/http.md b/docs/ref/api/http.md index 548339f3..dfa9d07d 100644 --- a/docs/ref/api/http.md +++ b/docs/ref/api/http.md @@ -106,6 +106,7 @@ void nng_http_set_status(nng_http *conn, nng_http_status status, const char *rea The {{i:`nng_http_get_status`}} function obtains the numeric code (typipcally numbered from 100 through 599) returned by the server in the last exchange on _conn_. (If no exchange has been performed yet, the result is undefined.) +The value is returned as an {{i:`nng_http_status`}}. A descriptive message matching the status code is returned by {{i:`nng_http_get_reason`}}. diff --git a/docs/ref/api/index.md b/docs/ref/api/index.md index 77cbfca6..ef1a827d 100644 --- a/docs/ref/api/index.md +++ b/docs/ref/api/index.md @@ -18,6 +18,7 @@ include the `nng/nng.h` header file like so: - [Messages](msg.md) - [Sockets](sock.md) - [Contexts](ctx.md) +- [Pipes](pipe.md) - [Memory](memory.md) - [Time](time.md) - [URLs](url.md) diff --git a/docs/ref/api/pipe.md b/docs/ref/api/pipe.md new file mode 100644 index 00000000..fbd89120 --- /dev/null +++ b/docs/ref/api/pipe.md @@ -0,0 +1,157 @@ +# Pipes + +```c +typedef struct nng_pipe_s nng_pipe; +``` + +An {{i:`nng_pipe`}} is a handle to a {{i:pipe}} object, which can be thought of as a single {{i:connection}}. +(In most cases this is actually the case -- the pipe is an abstraction for a single TCP or IPC connection.) +Pipes are associated with either the listener or dialer that created them, +and therefore are also automatically associated with a single socket. + +> [!NOTE] +> The `nng_pipe` structure is always passed by value (both +> for input parameters and return values), and should be treated opaquely. +> Passing structures this way gives the compiler a chance to perform +> accurate type checks in functions passing values of this type. + +> [!TIP] +> Most applications should never concern themselves with individual pipes. +> 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. + +Pipe objects are created by [dialers][dialer] and and [listeners][listener]. + +## Initialization + +A pipe may be initialized using the macro {{i:`NNG_PIPE_INITIALIZER`}} +before it is opened, to prevent confusion with valid open pipes. + +For example: + +```c +nng_pipe p = NNG_PIPE_INITIALIZER; +``` + +## Pipe Identity + +```c +int nng_pipe_id(nng_pipe p); +``` + +The {{i:`nng_pipe_id`}} function returns a positive identifier for the pipe _p_, if it is valid. +Otherwise it returns `-1`. + +> [!NOTE] +> 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 +> [`NNG_PIPE_INITIALIZER`] to ensure that they cannot be confused with a valid pipe. + +## Closing a Pipe + +```c +nng_err nng_pipe_close(nng_pipe p); +``` + +The {{i:`nng_pipe_close`}} function closes the supplied pipe, _p_. +Messages that have been submitted for sending may be flushed or delivered, +depending upon the transport. + +Further attempts to use the pipe after this call returns will result in [`NNG_ECLOSED`]. + +> [!TIP] +> Pipes are automatically closed when their creator closes, or when the +> remote peer closes the underlying connection. + +## Pipe Creator + +```c +nng_dialer nng_pipe_dialer(nng_pipe p); +nng_listener nng_pipe_listener(nng_pipe p); +nng_socket nng_pipe_socket(nng_pipe p); +``` + +{{hi:`nng_pipe_dialer`}} +{{hi:`nng_pipe_listener`}} +{{hi:`nng_pipe_socket`}} +These functions return the [socket], [dialer], or [listener] that created or owns the pipe. + +If the pipe was does not have an associated dialer or listener, then the associated will +return [`NNG_DIALER_INITIALIZER`] or [`NNG_LISTENER_INITIALIZER`], as appropriate, and +either [`nng_dialer_id`] or [`nng_listener_id`] for the returned object will return -1. + +> [!NOTE] +> 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 [`NNG_ECLOSED`].) + +## Pipe Options + +```c +nng_err nng_pipe_get_bool(nng_pipe p, const char *opt, bool *valp); +nng_err nng_pipe_get_int(nng_pipe p, const char *opt, int *valp); +nng_err nng_pipe_get_ms(nng_pipe p, const char *opt, nng_duration *valp); +nng_err nng_pipe_get_size(nng_pipe p, const char *opt, size_t *valp); +nng_err nng_pipe_get_addr(nng_pipe p, const char *opt, nng_sockaddr *valp); +nng_err nng_pipe_get_string(nng_pipe p, const char *opt, char **valp); +``` + +{{hi:`nng_pipe_get_bool`}} +{{hi:`nng_pipe_get_int`}} +{{hi:`nng_pipe_get_ms`}} +{{hi:`nng_pipe_get_size`}} +{{hi:`nng_pipe_get_addr`}} +{{hi:`nng_pipe_get_string`}} +These functions are used to obtain value of an option named _opt_ from the pipe _p_, and store it in the location +referenced by _valp_. + +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. + +In the case of `nng_pipe_get_string`, the string is created as if by [`nng_strdup`], and must be freed by +the caller using [`nng_strfree`] when no longer needed. + +## Pipe Notifications + +```c +typedef enum { + NNG_PIPE_EV_ADD_PRE, + NNG_PIPE_EV_ADD_POST, + NNG_PIPE_EV_REM_POST, +} nng_pipe_ev; + +typedef void (*nng_pipe_cb)(nng_pipe, nng_pipe_ev, void *); + +nng_err nng_pipe_notify(nng_socket s, nng_pipe_ev ev, nng_pipe_cb cb, void *arg); +``` + +The {{i:`nng_pipe_notify`}} function registers the callback function _cb_ +to be called whenever the pipe event specified by +_ev_ occurs on the socket _s_. +The callback _cb_ will be passed _arg_ as its final argument. + +A different callback may be supplied for each event. +Each event may have at most one callback registered. +Registering a callback implicitly unregisters any previously registered. + +The following pipe events are supported: + +| Event | Description | +| --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| {{i:`NNG_PIPE_EV_ADD_PRE`}}<a name="NNG_PIPE_EV_ADD_PRE"></a> | 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 [`nng_pipe_close`]) at this point, the socket will never see the pipe, and no further events will occur for the given pipe. | +| {{i:`NNG_PIPE_EV_ADD_POST`}}<a name="NNG_PIPE_EV_ADD_POST"></a> | 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. | +| {{i:`NNG_PIPE_EV_REM_POST`}}<a name="NNG_PIPE_EV_REM_POST"></a> | 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. | + +> [!WARNING] +> The callback _cb_ function must _not_ attempt to perform any +> accesses to the socket, as it is called with a lock on the socket held! +> Doing so would thus result in a deadlock. + +> [!TIP] +> The callback _cb_ may close a pipe for any reason by simply closing it using [`nng_pipe_close`]. +> For example, this might be done to prevent an unauthorized peer from connecting to the socket, +> if an authorization check made during `NNG_PIPE_EV_ADD_PRE` fails. + +> [!NOTE] +> This function ignores invalid values for _ev_. + +{{#include ../xref.md}} diff --git a/docs/ref/xref.md b/docs/ref/xref.md index bee853ff..e3b57585 100644 --- a/docs/ref/xref.md +++ b/docs/ref/xref.md @@ -236,6 +236,19 @@ [`nng_ctx_send`]: /api/ctx.md#nng_ctx_send [`nng_ctx_recvmsg`]: /api/ctx.md#nng_ctx_recvmsg [`nng_ctx_recv`]: /api/ctx.md#nng_ctx_recv +[`nng_pipe`]: /api/pipe.md#pipes +[`nng_pipe_id`]: /api/pipe.md#pipe-identity +[`nng_pipe_close`]: /api/pipe.md#closing-a-pipe +[`nng_pipe_dialer`]: /api/pipe.md#pipe-creator +[`nng_pipe_listener`]: /api/pipe.md#pipe-creator +[`nng_pipe_socket`]: /api/pipe.md#pipe-creator +[`nng_pipe_get_bool`]: /api/pipe.md#pipe-options +[`nng_pipe_get_int`]: /api/pipe.md#pipe-options +[`nng_pipe_get_ms`]: /api/pipe.md#pipe-options +[`nng_pipe_get_size`]: /api/pipe.md#pipe-options +[`nng_pipe_get_addr`]: /api/pipe.md#pipe-options +[`nng_pipe_get_string`]: /api/pipe.md#pipe-options +[`nng_pipe_notify`]: /api/pipe.md#pipe-notifications [`nng_sockaddr`]: /TODO.md [`nng_sockaddr_in`]: /TODO.md [`nng_sockaddr_in6`]: /TODO.md @@ -258,19 +271,20 @@ [`nng_http_set_version`]: /api/http.md#http-protocol-versions [`nng_http_get_method`]: /api/http.md#http-method [`nng_http_set_method`]: /api/http.md#http-method -[`nng_http_set_url`]: /api/http.md#preparing-a-transaction +[`nng_http_set_uri`]: /api/http.md#http-uri +[`nng_http_get_uri`]: /api/http.md#http-uri [`nng_http_get_reason`]: /api/http.md#http-status [`nng_http_get_status`]: /api/http.md#http-status [`nng_http_set_status`]: /api/http.md#http-status -[`nng_http_get_url`]: /TODO.md [`nng_http_hijack`]: /api/http.md#hijacking-connections [`nng_http_get_header`]: /api/http.md#retrieving-headers [`nng_http_next_header`]: /api/http.md#retrieving-headers [`nng_http_add_header`]: /api/http.md#modifying-headers [`nng_http_set_header`]: /api/http.md#modifying-headers [`nng_http_del_header`]: /api/http.md#modifying-headers -[`nng_http_set_response_body`]: /TODO.md -[`nng_http_get_response_body`]: /TODO.md +[`nng_http_copy_body`]: /api/http.md#storing-body-content +[`nng_http_set_body`]: /api/http.md#storing-body-content +[`nng_http_get_body`]: /api/http.md#retrieving-body-content [`nng_http_read_response_body`]: /TODO.md [`nng_http_read_request_body`]: /TODO.md [`nng_http_server_set_error`]: /TODO.md @@ -352,6 +366,10 @@ [`NNG_OPT_IPC_PERMISSIONS`]: /tran/ipc.md#NNG_OPT_IPC_PERMISSIONS [`NNG_SOCKET_INITIALIZER`]: /api/sock.md#socket-structure [`NNG_CTX_INITIALIZER`]: /api/ctx.md#context-structure +[`NNG_PIPE_INITIALIZER`]: /api/pipe.md#initialization +[`NNG_PIPE_EV_ADD_PRE`]: /api/pipe.md#NNG_PIPE_EV_ADD_PRE +[`NNG_PIPE_EV_ADD_POST`]: /api/pipe.md#NNG_PIPE_EV_ADD_POST +[`NNG_PIPE_EV_REM_POST`]: /api/pipe.md#NNG_PIPE_EV_REM_POST <!-- Protocols --> @@ -378,7 +396,7 @@ [aio]: /api/aio.md [raw]: /api/sock.md#raw-mode-sockets -[pipe]: /TODO.md +[pipe]: /api/pipe.md [socket]: /TODO.md [context]: /TODO.md [dialer]: /TODO.md |
