From 05beb9ed7d75142483e3963501898fd9f32d7508 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Fri, 5 Apr 2024 00:36:24 -0700 Subject: Added nng_strerror and nng_msleep. --- docs/man/nng_msleep.3supp.adoc | 49 ----------------------------------------- docs/man/nng_strerror.3.adoc | 48 ---------------------------------------- docs/ref/util/nng_msleep.adoc | 22 ++++++++++++++++++ docs/ref/util/nng_strerror.adoc | 22 ++++++++++++++++++ 4 files changed, 44 insertions(+), 97 deletions(-) delete mode 100644 docs/man/nng_msleep.3supp.adoc delete mode 100644 docs/man/nng_strerror.3.adoc create mode 100644 docs/ref/util/nng_msleep.adoc create mode 100644 docs/ref/util/nng_strerror.adoc diff --git a/docs/man/nng_msleep.3supp.adoc b/docs/man/nng_msleep.3supp.adoc deleted file mode 100644 index 57d3615b..00000000 --- a/docs/man/nng_msleep.3supp.adoc +++ /dev/null @@ -1,49 +0,0 @@ -= nng_msleep(3supp) -// -// Copyright 2018 Staysail Systems, Inc. -// Copyright 2018 Capitar IT Group BV -// -// 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_msleep - sleep milliseconds - -== SYNOPSIS - -[source, c] ----- -#include -#include - -void nng_msleep(nng_duration msec); ----- - -== DESCRIPTION - -The `nng_msleep()` blocks the caller for at least _msec_ milliseconds. - -NOTE: This function may block for longer than requested. -The actual wait time is determined by the capabilities of the -underlying system. - -== RETURN VALUES - -None. - -== ERRORS - -None. - -== SEE ALSO - -[.text-left] -xref:nng_sleep_aio.3.adoc[nng_sleep_aio(3)], -xref:nng_strerror.3.adoc[nng_strerror(3)], -xref:nng_clock.3supp.adoc[nng_clock(3supp)], -xref:nng_duration.5.adoc[nng_duration(5)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/man/nng_strerror.3.adoc b/docs/man/nng_strerror.3.adoc deleted file mode 100644 index 145fd0bc..00000000 --- a/docs/man/nng_strerror.3.adoc +++ /dev/null @@ -1,48 +0,0 @@ -= nng_strerror(3) -// -// Copyright 2018 Staysail Systems, Inc. -// Copyright 2018 Capitar IT Group BV -// -// 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_strerror - return an error description - -== SYNOPSIS - -[source, c] ----- -#include - -const char * nng_strerror(int err); ----- - -== DESCRIPTION - -The `nng_strerror()` returns the human-readable description of the -given error in `err`. - -NOTE: The returned error message is provided in US English, but in the -future locale-specific strings may be presented instead. - -NOTE: The specific strings associated with specific error messages are -subject to change. -Therefore applications must not depend on the message, -but may use them verbatim when supplying information to end-users, such -as in diagnostic messages or log entries. - -== RETURN VALUES - -This function returns the human-readable error message, terminated -by a `NUL` byte. - -== SEE ALSO - -[.text-left] -xref:libnng.3.adoc[libnng(3)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/ref/util/nng_msleep.adoc b/docs/ref/util/nng_msleep.adoc new file mode 100644 index 00000000..83e69c60 --- /dev/null +++ b/docs/ref/util/nng_msleep.adoc @@ -0,0 +1,22 @@ +## nng_msleep + +Sleep milliseconds. + +### Synopsis + +```c +#include +#include + +void nng_msleep(nng_duration msec); +``` + +### Description + +The `nng_msleep` blocks the caller for at least _msec_ milliseconds.footnote:[This function may block for longer than requested. +The actual wait time is determined by the timer resolution of the underlying system.] + +### See Also + +xref:../aio/nng_sleep_aio.adoc[nng_sleep_aio], +xref:nng_clock.adoc[nng_clock] diff --git a/docs/ref/util/nng_strerror.adoc b/docs/ref/util/nng_strerror.adoc new file mode 100644 index 00000000..0fc62c82 --- /dev/null +++ b/docs/ref/util/nng_strerror.adoc @@ -0,0 +1,22 @@ +## nng_strerror + +Return an error description. + +### Synopsis + +```c +#include + +const char * nng_strerror(int err); +``` + +### Description + +The `nng_strerror` returns the human-readable description of the given error in `err`.footnote:[The error message is provided in US English, but in the future locale-specific strings may be available.] + +NOTE: The specific strings associated with specific error codes are subject to change without notice. +Therefore applications must not depend on the message contents, but pass them verbatim when supplying information to end-users, such as in diagnostic messages or log entries. + +### Return Values + +This function returns the human-readable error message, terminated by a `NUL` byte. -- cgit v1.2.3-70-g09d2