diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/man/libnng.3.adoc | 4 | ||||
| -rw-r--r-- | docs/man/nng_random.3supp.adoc | 42 | ||||
| -rw-r--r-- | docs/man/nng_version.3.adoc | 58 | ||||
| -rw-r--r-- | docs/ref/SUMMARY.md | 1 | ||||
| -rw-r--r-- | docs/ref/api/util/index.md | 1 | ||||
| -rw-r--r-- | docs/ref/api/util/nng_version.md | 36 |
6 files changed, 40 insertions, 102 deletions
diff --git a/docs/man/libnng.3.adoc b/docs/man/libnng.3.adoc index 122f9043..becffaa9 100644 --- a/docs/man/libnng.3.adoc +++ b/docs/man/libnng.3.adoc @@ -36,7 +36,7 @@ The following common functions exist in _libnng_. |xref:nng_strdup.3.adoc[nng_strdup()]|duplicate string |xref:nng_strerror.3.adoc[nng_strerror()]|return an error description |xref:nng_strfree.3.adoc[nng_strfree()]|free string -|xref:nng_version.3.adoc[nng_version()]|report library version +// |xref:nng_version.3.adoc[nng_version()]|report library version |=== === Socket Functions @@ -293,7 +293,7 @@ as a convenience to aid in creating portable applications. // |xref:nng_mtx_lock.3supp.adoc[nng_mtx_lock()]|lock mutex // |xref:nng_mtx_unlock.3supp.adoc[nng_mtx_unlock()]|unlock mutex |xref:nng_opts_parse.3supp.adoc[nng_opts_parse()]|parse command line options -|xref:nng_random.3supp.adoc[nng_random()]|get random number +// |xref:nng_random.3supp.adoc[nng_random()]|get random number |xref:nng_socket_pair.3supp.adoc[nng_socket_pair()]|create connected pair of BSD sockets |xref:nng_thread_create.3supp.adoc[nng_thread_create()]|create thread |xref:nng_thread_destroy.3supp.adoc[nng_thread_destroy()]|reap thread diff --git a/docs/man/nng_random.3supp.adoc b/docs/man/nng_random.3supp.adoc deleted file mode 100644 index c2cd4bac..00000000 --- a/docs/man/nng_random.3supp.adoc +++ /dev/null @@ -1,42 +0,0 @@ -= nng_random(3supp) -// -// Copyright 2024 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_random - get random number - -== SYNOPSIS - -[source, c] ----- -#include <nng/nng.h> - -uint32_t nng_random(void); ----- - -== DESCRIPTION - -The `nng_random()` returns a random number. -The value is obtained using platform specific cryptographically strong random -number facilities when available. - -== RETURN VALUES - -Random number. - -== ERRORS - -None. - -== SEE ALSO - -[.text-left] -xref:nng.7.adoc[nng(7)] diff --git a/docs/man/nng_version.3.adoc b/docs/man/nng_version.3.adoc deleted file mode 100644 index 8859a46a..00000000 --- a/docs/man/nng_version.3.adoc +++ /dev/null @@ -1,58 +0,0 @@ -= nng_version(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_version - report library version - -== SYNOPSIS - -[source, c] ----- -#include <nng/nng.h> - -const char * nng_version(void); ----- - -== DESCRIPTION - -The `nng_version()` function returns a human readable ((version number)) -for _NNG_. - -Additionally, compile time version information is available -via some predefined macros: - -[horizontal] -((`NNG_MAJOR_VERSION`)):: Major version number. -((`NNG_MINOR_VERSION`)):: Minor version number. -((`NNG_PATCH_VERSION`)):: Patch version number. - -_NNG_ is developed and released using -http://www.semver.org[Semantic Versioning 2.0], and -the version numbers reported refer to both the API and the -library itself. -(The ((ABI)) -- ((application binary interface)) -- between the -library and the application is controlled in a similar, but different -manner depending upon the link options and how the library is built.) - -== RETURN VALUES - -Null-terminated string containing the library version number. - -== ERRORS - -None. - -== SEE ALSO - -[.text-left] -xref:libnng.3.adoc[libnng(3)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/ref/SUMMARY.md b/docs/ref/SUMMARY.md index 9a459383..193b316f 100644 --- a/docs/ref/SUMMARY.md +++ b/docs/ref/SUMMARY.md @@ -12,6 +12,7 @@ - [nng_id_map](./api/util/nng_id_map.md) - [nng_msleep](./api/util/nng_msleep.md) - [nng_random](./api/util/nng_random.md) + - [nng_version](./api/util/nng_version.md) - [Transports](./tran/index.md) diff --git a/docs/ref/api/util/index.md b/docs/ref/api/util/index.md index e11692c6..0a96da44 100644 --- a/docs/ref/api/util/index.md +++ b/docs/ref/api/util/index.md @@ -9,3 +9,4 @@ of other uses. - [nng_id_map](nng_id_map.md) - [nng_msleep](nng_msleep.md) - [nng_random](nng_random.md) +- [nng_version](nng_version.md) diff --git a/docs/ref/api/util/nng_version.md b/docs/ref/api/util/nng_version.md new file mode 100644 index 00000000..a84ed4cc --- /dev/null +++ b/docs/ref/api/util/nng_version.md @@ -0,0 +1,36 @@ +# nng_version + +## NAME + +nng_version --- report library version + +## SYNOPSIS + +```c +#include <nng/nng.h> + +const char * nng_version(void); +``` + +## DESCRIPTION + +The `nng_version` function returns a human readable {{i:version number}} +for _NNG_. + +Additionally, compile time version information is available +via some predefined macros: + +- {{i:`NNG_MAJOR_VERSION`}}: Major version number. +- {{i:`NNG_MINOR_VERSION`}}: Minor version number. +- {{i:`NNG_PATCH_VERSION`}}: Patch version number. + +_NNG_ is developed and released using +[Semantic Versioning 2.0](http://www.semver.org), and +the version numbers reported refer to both the API and the library itself. +(The {{i:ABI}} -- {{i:application binary interface}} -- between the +library and the application is controlled in a similar, but different +manner depending upon the link options and how the library is built.) + +## RETURN VALUES + +`NUL`-terminated string containing the library version number. |
