summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2024-04-06 11:24:20 -0700
committerGarrett D'Amore <garrett@damore.org>2024-04-06 11:24:20 -0700
commit410eba9514235058c42b922ecbf70e63e0a436e4 (patch)
tree2a12acf4908ea261b01020bd11b354874187b62d
parenta0a1d1fa5bd48e08fd456a74be56db0be6583dcb (diff)
downloadnng-410eba9514235058c42b922ecbf70e63e0a436e4.tar.gz
nng-410eba9514235058c42b922ecbf70e63e0a436e4.tar.bz2
nng-410eba9514235058c42b922ecbf70e63e0a436e4.zip
nng_sleep_aio - also addressed some errors
-rw-r--r--docs/man/nng_sleep_aio.3.adoc53
-rw-r--r--docs/ref/aio/nng_sleep_aio.adoc27
-rw-r--r--docs/ref/old/nng_ctx_getopt.adoc (renamed from docs/ref/ctx/nng_ctx_getopt.adoc)0
-rw-r--r--docs/ref/old/nng_ctx_setopt.adoc (renamed from docs/ref/ctx/nng_ctx_setopt.adoc)0
4 files changed, 27 insertions, 53 deletions
diff --git a/docs/man/nng_sleep_aio.3.adoc b/docs/man/nng_sleep_aio.3.adoc
deleted file mode 100644
index 2a3cf4f2..00000000
--- a/docs/man/nng_sleep_aio.3.adoc
+++ /dev/null
@@ -1,53 +0,0 @@
-= nng_sleep_aio(3)
-//
-// 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_sleep_aio - sleep asynchronously
-
-== SYNOPSIS
-
-[source, c]
-----
-#include <nng/nng.h>
-
-void nng_sleep_aio(nng_duration msec, nng_aio *aio);
-----
-
-== DESCRIPTION
-
-The `nng_sleep_aio()` function provides an asynchronous delay mechanism,
-causing the callback for _aio_ to be executed after _msec_ milliseconds.
-If the sleep finishes completely, the result will always be zero.
-
-NOTE: If a timeout is set on _aio_ using
-xref:nng_aio_set_timeout.3.adoc[`nng_aio_set_timeout()`], and it is shorter
-than _msec_,
-then the sleep will wake up early, with a result code of `NNG_ETIMEDOUT`.
-
-== RETURN VALUES
-
-None.
-
-== ERRORS
-
-None.
-
-== SEE ALSO
-
-[.text-left]
-xref:nng_aio_abort.3.adoc[nng_aio_abort(3)],
-xref:nng_aio_alloc.3.adoc[nng_aio_alloc(3)],
-xref:nng_aio_set_timeout.3.adoc[nng_aio_set_timeout(3)],
-xref:nng_strerror.3.adoc[nng_strerror(3)],
-xref:nng_aio.5.adoc[nng_aio(5)],
-xref:nng_duration.5.adoc[nng_duration(5)],
-xref:nng.7.adoc[nng(7)]
diff --git a/docs/ref/aio/nng_sleep_aio.adoc b/docs/ref/aio/nng_sleep_aio.adoc
new file mode 100644
index 00000000..f2ecd288
--- /dev/null
+++ b/docs/ref/aio/nng_sleep_aio.adoc
@@ -0,0 +1,27 @@
+## nng_sleep_aio
+
+Sleep asynchronously.
+
+### Synopsis
+
+```c
+#include <nng/nng.h>
+
+void nng_sleep_aio(nng_duration msec, nng_aio *aio);
+```
+
+### Description
+
+The `nng_sleep_aio` function provides an asynchronous delay mechanism, causing the callback for _aio_ to be executed after _msec_ milliseconds.
+If the sleep finishes completely, the result will always be zero.
+
+### Errors
+
+[horizontal]
+`NNG_ETIMEDOUT`:: The sleep was interrupted by a timeout.footnote:[This seemingly paradoxical situation happens if the _aio_ has a timeout set with xref:nng_aio_set_timeout.adoc[`nng_aio_set_timeout`] that is shorter than _msec_.]
+`NNG_ECANCELED`:: The operation was canceled.
+
+### See Also
+
+xref:nng_aio_abort.adoc[nng_aio_abort],
+xref:nng_aio_set_timeout.adoc[nng_aio_set_timeout] \ No newline at end of file
diff --git a/docs/ref/ctx/nng_ctx_getopt.adoc b/docs/ref/old/nng_ctx_getopt.adoc
index cd9dfd53..cd9dfd53 100644
--- a/docs/ref/ctx/nng_ctx_getopt.adoc
+++ b/docs/ref/old/nng_ctx_getopt.adoc
diff --git a/docs/ref/ctx/nng_ctx_setopt.adoc b/docs/ref/old/nng_ctx_setopt.adoc
index df6eda4d..df6eda4d 100644
--- a/docs/ref/ctx/nng_ctx_setopt.adoc
+++ b/docs/ref/old/nng_ctx_setopt.adoc