summaryrefslogtreecommitdiff
path: root/docs/reference
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2024-03-30 16:50:42 -0700
committerGarrett D'Amore <garrett@damore.org>2024-03-30 16:50:42 -0700
commitde233cfd5c8d6996ce6b6e5946c93b44a24bbbde (patch)
tree88120af5745d02574dcdfa71964b534c03f5c4c4 /docs/reference
parentb779b71b00c5f5f8cb9f0ee7d8feeadf9e2dca48 (diff)
downloadnng-de233cfd5c8d6996ce6b6e5946c93b44a24bbbde.tar.gz
nng-de233cfd5c8d6996ce6b6e5946c93b44a24bbbde.tar.bz2
nng-de233cfd5c8d6996ce6b6e5946c93b44a24bbbde.zip
context fixups
Diffstat (limited to 'docs/reference')
-rw-r--r--docs/reference/src/SUMMARY.md22
-rw-r--r--docs/reference/src/ctx/index.md (renamed from docs/reference/src/api/context/index.md)36
-rw-r--r--docs/reference/src/ctx/nng_ctx_close.md (renamed from docs/reference/src/api/context/nng_ctx_close.md)10
-rw-r--r--docs/reference/src/ctx/nng_ctx_get.md (renamed from docs/reference/src/api/context/nng_ctx_get.md)22
-rw-r--r--docs/reference/src/ctx/nng_ctx_getopt.md (renamed from docs/reference/src/api/context/nng_ctx_getopt.md)22
-rw-r--r--docs/reference/src/ctx/nng_ctx_id.md (renamed from docs/reference/src/api/context/nng_ctx_id.md)8
-rw-r--r--docs/reference/src/ctx/nng_ctx_open.md (renamed from docs/reference/src/api/context/nng_ctx_open.md)23
-rw-r--r--docs/reference/src/ctx/nng_ctx_recv.md (renamed from docs/reference/src/api/context/nng_ctx_recv.md)18
-rw-r--r--docs/reference/src/ctx/nng_ctx_recvmsg.md (renamed from docs/reference/src/api/context/nng_ctx_recvmsg.md)17
-rw-r--r--docs/reference/src/ctx/nng_ctx_send.md (renamed from docs/reference/src/api/context/nng_ctx_send.md)10
-rw-r--r--docs/reference/src/ctx/nng_ctx_sendmsg.md (renamed from docs/reference/src/api/context/nng_ctx_sendmsg.md)22
-rw-r--r--docs/reference/src/ctx/nng_ctx_set.md (renamed from docs/reference/src/api/context/nng_ctx_set.md)10
-rw-r--r--docs/reference/src/ctx/nng_ctx_setopt.md (renamed from docs/reference/src/api/context/nng_ctx_setopt.md)12
-rw-r--r--docs/reference/src/refs.md18
14 files changed, 146 insertions, 104 deletions
diff --git a/docs/reference/src/SUMMARY.md b/docs/reference/src/SUMMARY.md
index d6aaf9cb..50cf1668 100644
--- a/docs/reference/src/SUMMARY.md
+++ b/docs/reference/src/SUMMARY.md
@@ -59,17 +59,17 @@
- [Contexts](api/context/index.md)
- - [nng_ctx_close](api/context/nng_ctx_close.md)
- - [nng_ctx_get](api/context/nng_ctx_get.md)
- - [nng_ctx_getopt](api/context/nng_ctx_getopt.md)
- - [nng_ctx_id](api/context/nng_ctx_id.md)
- - [nng_ctx_open](api/context/nng_ctx_open.md)
- - [nng_ctx_recv](api/context/nng_ctx_recv.md)
- - [nng_ctx_recvmsg](api/context/nng_ctx_recvmsg.md)
- - [nng_ctx_send](api/context/nng_ctx_send.md)
- - [nng_ctx_sendmsg](api/context/nng_ctx_sendmsg.md)
- - [nng_ctx_set](api/context/nng_ctx_set.md)
- - [nng_ctx_setopt](api/context/nng_ctx_setopt.md)
+ - [nng_ctx_close](ctx/nng_ctx_close.md)
+ - [nng_ctx_get](ctx/nng_ctx_get.md)
+ - [nng_ctx_getopt](ctx/nng_ctx_getopt.md)
+ - [nng_ctx_id](ctx/nng_ctx_id.md)
+ - [nng_ctx_open](ctx/nng_ctx_open.md)
+ - [nng_ctx_recv](ctx/nng_ctx_recv.md)
+ - [nng_ctx_recvmsg](ctx/nng_ctx_recvmsg.md)
+ - [nng_ctx_send](ctx/nng_ctx_send.md)
+ - [nng_ctx_sendmsg](ctx/nng_ctx_sendmsg.md)
+ - [nng_ctx_set](ctx/nng_ctx_set.md)
+ - [nng_ctx_setopt](ctx/nng_ctx_setopt.md)
- [Asynchronous I/O](./api/aio/index.md)
diff --git a/docs/reference/src/api/context/index.md b/docs/reference/src/ctx/index.md
index d5a3fc90..074989d8 100644
--- a/docs/reference/src/api/context/index.md
+++ b/docs/reference/src/ctx/index.md
@@ -18,9 +18,9 @@ An `nng_ctx`{{hi:context}} is a handle to an underlying context object,
which keeps the protocol state for some stateful protocols.
The purpose of a separate context object is to permit applications to
share a single [socket](../socket/index.md), with its various underlying
-[dialers](nng_dialer.md),
-[listeners](nng_listener.md),
-[pipes](nng_pipe.md),
+[dialers][nng_dialer],
+[listeners][nng_listener],
+[pipes][nng_pipe],
while still benefiting from separate state tracking.
For example, a [_REQ_](../protocols/req.md) context will contain the request ID
@@ -121,9 +121,9 @@ echo(void *arg)
```
Given the above fragment, the following example shows setting up the
-service. It assumes that the [socket](nng_socket.md) has already been
+service. It assumes that the [socket][nng_socket] has already been
created and any transports set up as well with functions such as
-[`nng_dial()`](nng_dial.md) or [`nng_listen()`](nng_listen.md).
+[`nng_dial()`][nng_dial] or [`nng_listen()`](nng_listen.md).
```c
#define CONCURRENCY 1024
@@ -145,16 +145,18 @@ start_echo_service(nng_socket rep_socket)
## SEE ALSO
-[nng_ctx_close](nng_ctx_close.md),
-[nng_ctx_open](nng_ctx_open.md),
-[nng_ctx_get](nng_ctx_get.md),
-[nng_ctx_id](nng_ctx_id.md)
-[nng_ctx_recv](nng_ctx_recv.md),
-[nng_ctx_recvmsg](nng_ctx_recvmsg.md),
-[nng_ctx_send](nng_ctx_send.md),
-[nng_ctx_sendmsg](nng_ctx_sendmsg.md),
-[nng_ctx_set](nng_ctx_set.md),
-[nng_dialer](nng_dialer.md),
-[nng_listener](nng_listener.md),
+[nng_ctx_close][nng_ctx_close],
+[nng_ctx_open][nng_ctx_open],
+[nng_ctx_get][nng_ctx_get],
+[nng_ctx_id][nng_ctx_id]
+[nng_ctx_recv][nng_ctx_recv],
+[nng_ctx_recvmsg][nng_ctx_recvmsg],
+[nng_ctx_send][nng_ctx_send],
+[nng_ctx_sendmsg][nng_ctx_sendmsg],
+[nng_ctx_set][nng_ctx_set],
+[nng_dialer][nng_dialer],
+[nng_listener][nng_listener],
[nng_socket](../socket/index.md),
-[nng_options](nng_options.md)
+[nng_options][nng_options]
+
+{{#include ../refs.md}}
diff --git a/docs/reference/src/api/context/nng_ctx_close.md b/docs/reference/src/ctx/nng_ctx_close.md
index e33dd843..857808f1 100644
--- a/docs/reference/src/api/context/nng_ctx_close.md
+++ b/docs/reference/src/ctx/nng_ctx_close.md
@@ -14,7 +14,7 @@ int nng_ctx_close(nng_ctx ctx);
## DESCRIPTION
-The `nng_ctx_close()` function closes the context _ctx_.
+The `nng_ctx_close()` function closes the [context][context] _ctx_.
Messages that have been submitted for sending may be flushed or delivered,
depending upon the transport.
@@ -25,7 +25,7 @@ call is executed may also return with an `NNG_ECLOSED` result.
> [!NOTE]
> Closing the socket associated with _ctx_
-> (using [`nng_close()`](../socket/nng_close.md)) also closes this context.
+> (using [`nng_close()`][nng_close]) also closes this context.
## RETURN VALUES
@@ -37,5 +37,7 @@ This function returns 0 on success, and non-zero otherwise.
## SEE ALSO
-[nng_close](nng_close.md),
-[nng_ctx_open](nng_ctx_open.md)
+[nng_close][nng_close],
+[nng_ctx_open][nng_ctx_open]
+
+{{#include ../refs.md}}
diff --git a/docs/reference/src/api/context/nng_ctx_get.md b/docs/reference/src/ctx/nng_ctx_get.md
index 35407f18..dca3681f 100644
--- a/docs/reference/src/api/context/nng_ctx_get.md
+++ b/docs/reference/src/ctx/nng_ctx_get.md
@@ -28,9 +28,9 @@ int nng_ctx_get_uint64(nng_ctx ctx, const char *opt, uint64_t *u64p);
{{hi:options, context}}
The `nng_ctx_get()` functions are used to retrieve option values for
-the [context](index.md) _ctx_.
+the [context][context] _ctx_.
The actual options that may be retrieved in this way vary.
-A number of them are documented in [nng_options](../socket/nng_options.md).
+A number of them are documented in [nng_options][options].
> [!NOTE]
> Context options are protocol specific.
@@ -71,7 +71,7 @@ on the actual option, and will be documented with the option itself.
The value will be stored at _ivalp_.
- `nng_ctx_get_ms()`:\
- This function is used to retrieve time [durations](nng_duration.md)
+ This function is used to retrieve time [durations][duration]
(such as timeouts), stored in _durp_ as a number of milliseconds.
(The special value {{i:`NNG_DURATION_INFINITE`}} means an infinite amount of time, and
the special value {{i:`NNG_DURATION_DEFAULT`}} means a context-specific default.)
@@ -80,9 +80,9 @@ on the actual option, and will be documented with the option itself.
typically for buffer sizes, message maximum sizes, and similar options.
- `nng_ctx_get_string()`:\
This function is used to retrieve a string into _strp_.
- This string is created from the source using [`nng_strdup()`](nng_strdup.md)
+ This string is created from the source using [`nng_strdup()`][nng_strdup]
and consequently must be freed by the caller using
- [`nng_strfree()`](nng_strfree.md) when it is no longer needed.
+ [`nng_strfree()`][nng_strfree] when it is no longer needed.
- `nng_ctx_get_uint64()`:\
This function is used to retrieve a 64-bit unsigned value into the value
@@ -105,8 +105,10 @@ These functions return 0 on success, and non-zero otherwise.
## SEE ALSO
-[nng_ctx_set](nng_ctx_set.md),
-[nng_strdup](nng_strdup.md),
-[nng_strfree](nng_strfree.md),
-[nng_duration](nng_duration.md),
-[nng_options](../socket/nng_options.md)
+[nng_ctx_set][nng_ctx_set],
+[nng_strdup][nng_strdup],
+[nng_strfree][nng_strfree],
+[nng_duration][nng_duration],
+[nng_options][options]
+
+{{#include ../refs.md}}
diff --git a/docs/reference/src/api/context/nng_ctx_getopt.md b/docs/reference/src/ctx/nng_ctx_getopt.md
index 83a648d0..87d75519 100644
--- a/docs/reference/src/api/context/nng_ctx_getopt.md
+++ b/docs/reference/src/ctx/nng_ctx_getopt.md
@@ -27,12 +27,12 @@ int nng_ctx_getopt_uint64(nng_ctx ctx, const char *opt, uint64_t *u64p);
## DESCRIPTION
> [!IMPORTANT]
-> These functions are deprecated. Please see [nng_ctx_get](nng_ctx_get.md).
-> They may not be present if the library was built with `NNG_ELIDE_DEPRECATED`.
+> These functions are deprecated. Please see [nng_ctx_get][nng_ctx_get].
+> They may not be present if the library was built with {{i:`NNG_ELIDE_DEPRECATED`}}.
> They may also be removed entirely in a future version of _NNG_.
The `nng_ctx_getopt()` functions are used to retrieve option values for
-the [context](index.md) _ctx_.
+the [context][context] _ctx_.
The actual options that may be retrieved in this way vary.
> [!NOTE]
@@ -74,7 +74,7 @@ on the actual option, and will be documented with the option itself.
The value will be stored at _ivalp_.
- `nng_ctx_getopt_ms()`:\
- This function is used to retrieve time [durations](nng_duration.md)
+ This function is used to retrieve time [durations][nng_duration]
(such as timeouts), stored in _durp_ as a number of milliseconds.
(The special value `NNG_DURATION_INFINITE` means an infinite amount of time, and
the special value `NNG_DURATION_DEFAULT` means a context-specific default.)
@@ -85,9 +85,9 @@ on the actual option, and will be documented with the option itself.
- `nng_ctx_getopt_string()`:\
This function is used to retrieve a string into _strp_.
- This string is created from the source using [`nng_strdup()`](../util/nng_strdup.md)
+ This string is created from the source using [`nng_strdup()`][nng_strdup]
and consequently must be freed by the caller using
- [`nng_strfree()`](../util/nng_strfree.md) when it is no longer needed.
+ [`nng_strfree()`][nng_strfree] when it is no longer needed.
- `nng_ctx_getopt_uint64()`:\
This function is used to retrieve a 64-bit unsigned value into the value
@@ -110,7 +110,9 @@ These functions return 0 on success, and non-zero otherwise.
## SEE ALSO
-[nng_strdup](../util/nng_strdup.md),
-[nng_strfree](../util/nng_strfree.md),
-[nng_duration](nng_duration.md),
-[nng_options](../socket/nng_options.md)
+[nng_strdup][nng_strdup],
+[nng_strfree][nng_strfree],
+[nng_duration][duration],
+[nng_options][options]
+
+{{#include ../refs.md}}
diff --git a/docs/reference/src/api/context/nng_ctx_id.md b/docs/reference/src/ctx/nng_ctx_id.md
index 9d8d7223..6592da7d 100644
--- a/docs/reference/src/api/context/nng_ctx_id.md
+++ b/docs/reference/src/ctx/nng_ctx_id.md
@@ -14,18 +14,20 @@ int nng_ctx_id(nng_ctx c);
## DESCRIPTION
-The `nng_ctx_id()` function returns a positive identifier for the context _c_,
+The `nng_ctx_id()` function returns a positive identifier for the [context][context] _c_,
if it is valid.
Otherwise it returns `-1`.
> [!NOTE]
> A context is considered valid if it was ever opened with
-> [`nng_ctx_open()`](nng_ctx_open.md) function.
+> [`nng_ctx_open()`][nng_ctx_open] function.
> Contexts that are allocated on the stack or statically should be
-> initialized with the macro `NNG_CTX_INITIALIZER` to ensure that
+> initialized with the macro {{i:`NNG_CTX_INITIALIZER`}} to ensure that
> they cannot be confused with a valid context before they are opened.
## RETURN VALUES
This function returns the positive value for the context identifier, or
`-1` if the context is invalid.
+
+{{#include ../refs.md}}
diff --git a/docs/reference/src/api/context/nng_ctx_open.md b/docs/reference/src/ctx/nng_ctx_open.md
index b582e254..024081d5 100644
--- a/docs/reference/src/api/context/nng_ctx_open.md
+++ b/docs/reference/src/ctx/nng_ctx_open.md
@@ -14,8 +14,8 @@ int nng_ctx_open(nng_ctx *ctxp, nng_socket s);
## DESCRIPTION
-The `nng_ctx_open()` function creates a separate {{i:context}} to be used with
-the socket _s_,
+The `nng_ctx_open()` function creates a separate {{hi:context}}[context][context] to be used with
+the [socket][socket] _s_,
and returns it at the location pointed by _ctxp_.
> [!NOTE]
@@ -24,7 +24,7 @@ and returns it at the location pointed by _ctxp_.
Contexts allow the independent and concurrent use of stateful operations
using the same socket.
For example, two different contexts created on a
-[_REP_](../protocols/rep.md)
+[_REP_][rep]
socket can each receive requests, and send replies to them, without any
regard to or interference with each other.
@@ -32,10 +32,10 @@ regard to or interference with each other.
> Using contexts is an excellent way to write simpler concurrent
> applications, while retaining the benefits of the protocol-specific
> advanced processing, avoiding the need to bypass that with
-> {{hi:raw mode}}[raw mode](../overview/raw.md) sockets.
+> {{hi:raw mode}}[raw mode][raw] sockets.
> [!NOTE]
-> Use of contexts with [raw mode](../overview/raw.md) sockets is
+> Use of contexts with [raw mode][raw] sockets is
> nonsensical, and not supported.
## RETURN VALUES
@@ -49,8 +49,11 @@ This function returns 0 on success, and non-zero otherwise.
## SEE ALSO
-[nng_ctx_close](nng_ctx_close.md),
-[nng_ctx_get](nng_ctx_get.md),
-[nng_ctx_recv](nng_ctx_recv.md),
-[nng_ctx_send](nng_ctx_send.md),
-[nng_ctx_set](nng_ctx_set.md)
+[nng_ctx_close][nng_ctx_close],
+[nng_ctx_get][nng_ctx_get],
+[nng_ctx_recv][nng_ctx_recv],
+[nng_ctx_send][nng_ctx_send],
+[nng_ctx_set][nng_ctx_set],
+[Sockets][socket]
+
+{{#include ../refs.md}}
diff --git a/docs/reference/src/api/context/nng_ctx_recv.md b/docs/reference/src/ctx/nng_ctx_recv.md
index 2ef398ea..94ed21f9 100644
--- a/docs/reference/src/api/context/nng_ctx_recv.md
+++ b/docs/reference/src/ctx/nng_ctx_recv.md
@@ -14,14 +14,14 @@ void nng_ctx_recv(nng_ctx ctx, nng_aio *aio);
## DESCRIPTION
-The `nng_ctx_recv()` receives a [message](../msg/index.md) using the
-[context](index.md) _s_ asynchronously.
+The `nng_ctx_recv()` receives a [message][msg] using the
+[context][context] _ctx_ asynchronously.
When a message is successfully received by the context, it is
-stored in the _aio_ by an internal call equivalent to
-[`nng_aio_set_msg()`](../aio/nng_aio_set_msg.md), then the completion
+stored in the [_aio_][aio] by an internal call equivalent to
+[`nng_aio_set_msg()`][nng_aio_set_msg], then the completion
callback on the _aio_ is executed.
-In this case, [`nng_aio_result()`](../aio/nng_aio_result.md) will
+In this case, [`nng_aio_result()`][nng_aio_result] will
return zero.
The callback function is responsible for retrieving the message
and disposing of it appropriately.
@@ -33,7 +33,7 @@ and disposing of it appropriately.
If for some reason the asynchronous receive cannot be completed
successfully (including by being canceled or timing out), then
the callback will still be executed,
-but [`nng_aio_result()`](../aio/nng_aio_result.md) will be non-zero.
+but [`nng_aio_result()`][nng_aio_result] will be non-zero.
> [!TIP]
> The semantics of what receiving a message means varies from protocol to
@@ -52,5 +52,7 @@ The following errors may be set on the _aio_, if the operation fails.
## SEE ALSO
-[Asynchronous I/O](../aio/index.md),
-[Messages](../msg/index.md)
+[Asynchronous I/O][aio],
+[Messages][msg]
+
+{{#include ../refs.md}}
diff --git a/docs/reference/src/api/context/nng_ctx_recvmsg.md b/docs/reference/src/ctx/nng_ctx_recvmsg.md
index c0065dd3..028ad9e6 100644
--- a/docs/reference/src/api/context/nng_ctx_recvmsg.md
+++ b/docs/reference/src/ctx/nng_ctx_recvmsg.md
@@ -14,12 +14,12 @@ int nng_ctx_recvmsg(nng_ctx ctx, nng_msg **msgp, int flags);
## DESCRIPTION
-The `nng_ctx_recvmsg()` receives a message on context _ctx_, storing the
-received message at the location pointed to by _msgp_.
+The `nng_ctx_recvmsg()` receives a message on [context][context] _ctx_, storing the
+received [message][msg] at the location pointed to by _msgp_.
The _flags_ may contain the following value:
-- `NNG_FLAG_NONBLOCK`:\
+- {{i:`NNG_FLAG_NONBLOCK`}}:\
The function returns immediately, even if no message is available.
Without this flag, the function will wait until a message is receivable
on the context _ctx_, or any configured timer expires.
@@ -44,7 +44,10 @@ This function returns 0 on success, and non-zero otherwise.
## SEE ALSO
-[nng_msg_free()](../msg/nng_msg_free.md),
-[nng_ctx_open()](nng_ctx_open.md),
-[nng_ctx_recv()](nng_ctx_recv.md),
-[nng_ctx_sendmsg()](nng_ctx_sendmsg.md)
+[nng_msg_free][nng_msg_free],
+[nng_ctx_open][nng_ctx_open],
+[nng_ctx_recv][nng_ctx_recv],
+[nng_ctx_sendmsg][nng_ctx_sendmsg],
+[Messages][msg]
+
+{{#include ../refs.md}}
diff --git a/docs/reference/src/api/context/nng_ctx_send.md b/docs/reference/src/ctx/nng_ctx_send.md
index 9caad652..dfe1796b 100644
--- a/docs/reference/src/api/context/nng_ctx_send.md
+++ b/docs/reference/src/ctx/nng_ctx_send.md
@@ -15,7 +15,7 @@ void nng_ctx_send(nng_ctx ctx, nng_aio *aio);
## DESCRIPTION
The `nng_ctx_send()` sends a [message](../msg/index.md) using the
-[context](nng_ctx.md) _ctx_ asynchronously.
+[context][nng_ctx] _ctx_ asynchronously.
The message to send must have previously been set on the _aio_
using the [`nng_aio_set_msg()`](../aio/nng_aio_set_msg.md) function.
@@ -61,8 +61,10 @@ socket, or deallocating the message with [`nng_msg_free()`](../msg/nng_msg_free.
[nng_aio_get_msg](../aio/nng_aio_get_msg.md),
[nng_aio_set_msg](../aio/nng_aio_set_msg.md),
-[nng_ctx_sendmsg](nng_ctx_sendmsg.md),
+[nng_ctx_sendmsg][nng_ctx_sendmsg],
[nng_msg_alloc](../msg/nng_msg_alloc.md),
[nng_msg_free](../msg/nng_msg_free.md),
-[Asynchronous I/O](../aio/index.md),
-[Messages](../msg/index.md)
+[Asynchronous I/O][aio],
+[Messages][msg]
+
+{{#include ../refs.md}}
diff --git a/docs/reference/src/api/context/nng_ctx_sendmsg.md b/docs/reference/src/ctx/nng_ctx_sendmsg.md
index 346f927d..e3ecb974 100644
--- a/docs/reference/src/api/context/nng_ctx_sendmsg.md
+++ b/docs/reference/src/ctx/nng_ctx_sendmsg.md
@@ -14,7 +14,7 @@ int nng_ctx_sendmsg(nng_ctx c, nng_msg *msg, int flags);
## DESCRIPTION
-The `nng_ctx_sendmsg()` sends message _msg_ using the context _ctx_.
+The `nng_ctx_sendmsg()` sends [message][msg] _msg_ using the [context][context] _ctx_.
If the function returns zero, indicating it has accepted the message for
delivery, then the _msg_ is owned by the socket _s_, and the caller
@@ -31,20 +31,20 @@ another socket, or simply trying again later.
The _flags_ may contain the following value:
-- `NNG_FLAG_NONBLOCK`:\
+- {{i:`NNG_FLAG_NONBLOCK`}}:\
The function returns immediately, regardless of whether
the context is able to accept the data or not.
If the context is unable to accept the data (such as if backpressure exists
because the peers are consuming messages too slowly, or no peer is present),
then the function will return with `NNG_EAGAIN`.
If this flag is not specified, then the function will block if such a
- condition exists.
+ condition exists.[^1]
-> [!NOTE]
-> Regardless of the presence or absence of `NNG_FLAG_NONBLOCK`, there may
-> be queues between the sender and the receiver.
-> Furthermore, there is no guarantee that the message has actually been delivered.
-> Finally, with some protocols, the semantic is implicitly `NNG_FLAG_NONBLOCK`.
+[^1]:
+ Regardless of the presence or absence of {{i:`NNG_FLAG_NONBLOCK`}}, there may
+ be queues between the sender and the receiver.
+ Furthermore, there is no guarantee that the message has actually been delivered.
+ Finally, with some protocols, the semantic is implicitly `NNG_FLAG_NONBLOCK`.
## RETURN VALUES
@@ -63,5 +63,7 @@ This function returns 0 on success, and non-zero otherwise.
## SEE ALSO
-[nng_ctx_send()](nng_ctx_send.md),
-[Messages](../msg/index.md)
+[nng_ctx_send][nng_ctx_send],
+[Messages][msg]
+
+{{#include ../refs.md}}
diff --git a/docs/reference/src/api/context/nng_ctx_set.md b/docs/reference/src/ctx/nng_ctx_set.md
index b3237717..b94cff50 100644
--- a/docs/reference/src/api/context/nng_ctx_set.md
+++ b/docs/reference/src/ctx/nng_ctx_set.md
@@ -56,7 +56,7 @@ on the actual option, and will be documented with the option itself.
- `nng_ctx_set_ms()`:\
This function is used to configure time durations (such as timeouts) using
- type [`nng_duration`](nng_duration.md).
+ type [`nng_duration`][nng_duration].
The duration _dur_ is an integer number of milliseconds.
- `nng_ctx_set_size()`:\
@@ -89,6 +89,8 @@ These functions return 0 on success, and non-zero otherwise.
## SEE ALSO
-[nng_ctx_get](nng_ctx_get),
-[nng_socket_set](../socket/nng_socket_get),
-[nng_options](nng_options)
+[nng_ctx_get][nng_ctx_get],
+[nng_socket_set][nng_socket_get],
+[Options][options]
+
+{{#include ../refs.md}}
diff --git a/docs/reference/src/api/context/nng_ctx_setopt.md b/docs/reference/src/ctx/nng_ctx_setopt.md
index f62b6857..f738bbe5 100644
--- a/docs/reference/src/api/context/nng_ctx_setopt.md
+++ b/docs/reference/src/ctx/nng_ctx_setopt.md
@@ -28,8 +28,8 @@ int nng_ctx_setopt_uint64(nng_ctx ctx, const char *opt, uint64_t u64);
> [!IMPORTANT]
> These functions are deprecated.
-> Please see [nng_ctx_set()](nng_ctx_set.md).
-> They may not be present if the library was built with `NNG_ELIDE_DEPRECATED`.
+> Please see [nng_ctx_set()][nng_ctx_set].
+> They may not be present if the library was built with {{i:`NNG_ELIDE_DEPRECATED`}}.
> They may also be removed entirely in a future version of _NNG_.
The `nng_ctx_setopt()` functions are used to configure options for
@@ -61,7 +61,7 @@ on the actual option, and will be documented with the option itself.
- `nng_ctx_setopt_ms()`:\
This function is used to configure time durations (such as timeouts) using
- type [`nng_duration`](nng_duration.md).
+ type [`nng_duration`][nng_duration].
The duration _dur_ is an integer number of milliseconds.
- `nng_ctx_setopt_size()`:\
@@ -94,5 +94,7 @@ These functions return 0 on success, and non-zero otherwise.
## SEE ALSO
-[nng_ctx_set](nng_ctx_set.md),
-[nng_options](nng_options.md)
+[nng_ctx_set][nng_ctx_set],
+[Options][options]
+
+{{#include ../refs.md}}
diff --git a/docs/reference/src/refs.md b/docs/reference/src/refs.md
index e51ffe4e..47071a0a 100644
--- a/docs/reference/src/refs.md
+++ b/docs/reference/src/refs.md
@@ -1,10 +1,12 @@
<!-- Concepts -->
-[context]: ../overview/context.md
+[aio]: ../aio/index.md
+[context]: ../ctx/index.md
[device]: ../overview/device.md
[duration]: ../overview/duration.md
[msg]: ../msg/index.md
[pipe]: ../overview/pipe.md
+[socket]: ../sock/index.md
[sockadddr]: ../overview/sockaddr.md
[sockaddr_in]: ../overview/sockaddr_in.md
[sockaddr_in6]: ../overview/sockaddr_in6.md
@@ -64,6 +66,20 @@
[nng_msg_set_pipe]: ../msg/nng_msg_set_pipe.md
[nng_msg_trim]: ../msg/nng_msg_trim.md
+<!-- Contexts -->
+
+[nng_ctx_close]: ../ctx/nng_ctx_close.md
+[nng_ctx_get]: ../ctx/nng_ctx_get.md
+[nng_ctx_getopt]: ../ctx/nng_ctx_getopt.md
+[nng_ctx_id]: ../ctx/nng_ctx_id.md
+[nng_ctx_open]: ../ctx/nng_ctx_open.md
+[nng_ctx_recv]: ../ctx/nng_ctx_recv.md
+[nng_ctx_recvmsg]: ../nng_ctx_recvmsg.md
+[nng_ctx_send]: ../nng_ctx_send.md
+[nng_ctx_sendmsg]: ../ctx/nng_ctx_sendmsg.dm
+[nng_ctx_set]: ../ctx/nng_ctx_set.md
+[nng_ctx_setopt]: ../ctx/nng_ctx_setopt.md
+
<!-- Threads -->
[nng_cv_alloc]: ../thr/nng_cv_alloc.md