diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-03-25 21:11:43 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-03-25 21:11:43 -0700 |
| commit | 9d71bbc9f67478ccc28bf6ea9cb1617e8293be94 (patch) | |
| tree | 5f8da683d30f024b705df82754be3a17c6ad6327 /docs/reference | |
| parent | 331bd5a7c360083f245fe6c82afa38dd05c4a9c9 (diff) | |
| download | nng-9d71bbc9f67478ccc28bf6ea9cb1617e8293be94.tar.gz nng-9d71bbc9f67478ccc28bf6ea9cb1617e8293be94.tar.bz2 nng-9d71bbc9f67478ccc28bf6ea9cb1617e8293be94.zip | |
More updates
Diffstat (limited to 'docs/reference')
| -rw-r--r-- | docs/reference/src/api/socket/index.md (renamed from docs/reference/src/api/protocol.md) | 0 | ||||
| -rw-r--r-- | docs/reference/src/api/socket/nng_bus_open.md (renamed from docs/reference/src/api/nng_bus_open.md) | 0 | ||||
| -rw-r--r-- | docs/reference/src/api/socket/nng_close.md (renamed from docs/reference/src/api/nng_close.md) | 0 | ||||
| -rw-r--r-- | docs/reference/src/api/socket/nng_pub_open.md | 53 | ||||
| -rw-r--r-- | docs/reference/src/api/threads/nng_cv_alloc.md (renamed from docs/reference/src/api/nng_cv_alloc.md) | 0 | ||||
| -rw-r--r-- | docs/reference/src/api/threads/nng_cv_free.md (renamed from docs/reference/src/api/nng_cv_free.md) | 0 | ||||
| -rw-r--r-- | docs/reference/src/api/threads/nng_cv_until.md (renamed from docs/reference/src/api/nng_cv_until.md) | 0 | ||||
| -rw-r--r-- | docs/reference/src/api/threads/nng_cv_wait.md (renamed from docs/reference/src/api/nng_cv_wait.md) | 0 | ||||
| -rw-r--r-- | docs/reference/src/api/threads/nng_cv_wake.md (renamed from docs/reference/src/api/nng_cv_wake.md) | 0 | ||||
| -rw-r--r-- | docs/reference/src/api/threads/nng_cv_wake1.md (renamed from docs/reference/src/api/nng_cv_wake1.md) | 0 | ||||
| -rw-r--r-- | docs/reference/src/api/util/nng_random.md | 45 | ||||
| -rw-r--r-- | docs/reference/src/api/util/nng_strerror.md | 48 |
12 files changed, 146 insertions, 0 deletions
diff --git a/docs/reference/src/api/protocol.md b/docs/reference/src/api/socket/index.md index 990b7cbb..990b7cbb 100644 --- a/docs/reference/src/api/protocol.md +++ b/docs/reference/src/api/socket/index.md diff --git a/docs/reference/src/api/nng_bus_open.md b/docs/reference/src/api/socket/nng_bus_open.md index a579acfb..a579acfb 100644 --- a/docs/reference/src/api/nng_bus_open.md +++ b/docs/reference/src/api/socket/nng_bus_open.md diff --git a/docs/reference/src/api/nng_close.md b/docs/reference/src/api/socket/nng_close.md index 486cfe2c..486cfe2c 100644 --- a/docs/reference/src/api/nng_close.md +++ b/docs/reference/src/api/socket/nng_close.md diff --git a/docs/reference/src/api/socket/nng_pub_open.md b/docs/reference/src/api/socket/nng_pub_open.md new file mode 100644 index 00000000..c9f3b5b5 --- /dev/null +++ b/docs/reference/src/api/socket/nng_pub_open.md @@ -0,0 +1,53 @@ += nng_pub_open(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_pub_open - create pub socket + +== SYNOPSIS + +[source,c] +---- +#include <nng/nng.h> +#include <nng/protocol/pubsub0/pub.h> + +int nng_pub0_open(nng_socket *s); + +int nng_pub0_open_raw(nng_socket *s); +---- + +== DESCRIPTION + +The `nng_pub0_open()` function creates a xref:nng_pub.7.adoc[_pub_] version 0 +xref:nng_socket.5.adoc[socket] and returns it at the location pointed to by _s_. + +The `nng_pub0_open_raw()` function creates a xref:nng_pub.7.adoc[_pub_] version 0 +xref:nng_socket.5.adoc[socket] in +xref:nng.7.adoc#raw_mode[raw] mode and returns it at the location pointed to by _s_. + +== RETURN VALUES + +These functions return 0 on success, and non-zero otherwise. + +== ERRORS + +[horizontal] +`NNG_ENOMEM`:: Insufficient memory is available. +`NNG_ENOTSUP`:: The protocol is not supported. + +== SEE ALSO + +[.text-left] +xref:nng_socket.5.adoc[nng_socket(5)], +xref:nng_pub.7.adoc[nng_pub(7)], +xref:nng_sub.7.adoc[nng_sub(7)], +xref:nng.7.adoc[nng(7)] diff --git a/docs/reference/src/api/nng_cv_alloc.md b/docs/reference/src/api/threads/nng_cv_alloc.md index 7379df7e..7379df7e 100644 --- a/docs/reference/src/api/nng_cv_alloc.md +++ b/docs/reference/src/api/threads/nng_cv_alloc.md diff --git a/docs/reference/src/api/nng_cv_free.md b/docs/reference/src/api/threads/nng_cv_free.md index 87412ce9..87412ce9 100644 --- a/docs/reference/src/api/nng_cv_free.md +++ b/docs/reference/src/api/threads/nng_cv_free.md diff --git a/docs/reference/src/api/nng_cv_until.md b/docs/reference/src/api/threads/nng_cv_until.md index 34669953..34669953 100644 --- a/docs/reference/src/api/nng_cv_until.md +++ b/docs/reference/src/api/threads/nng_cv_until.md diff --git a/docs/reference/src/api/nng_cv_wait.md b/docs/reference/src/api/threads/nng_cv_wait.md index 1f4ddf42..1f4ddf42 100644 --- a/docs/reference/src/api/nng_cv_wait.md +++ b/docs/reference/src/api/threads/nng_cv_wait.md diff --git a/docs/reference/src/api/nng_cv_wake.md b/docs/reference/src/api/threads/nng_cv_wake.md index e83fa96d..e83fa96d 100644 --- a/docs/reference/src/api/nng_cv_wake.md +++ b/docs/reference/src/api/threads/nng_cv_wake.md diff --git a/docs/reference/src/api/nng_cv_wake1.md b/docs/reference/src/api/threads/nng_cv_wake1.md index 1c70388d..1c70388d 100644 --- a/docs/reference/src/api/nng_cv_wake1.md +++ b/docs/reference/src/api/threads/nng_cv_wake1.md diff --git a/docs/reference/src/api/util/nng_random.md b/docs/reference/src/api/util/nng_random.md new file mode 100644 index 00000000..3f8ac39e --- /dev/null +++ b/docs/reference/src/api/util/nng_random.md @@ -0,0 +1,45 @@ += nng_random(3supp) +// +// 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_random - get random number + +== SYNOPSIS + +[source, c] +---- +#include <nng/nng.h> +#include <nng/supplemental/util/platform.h> + +uint32_t nng_random(void); +---- + +== DESCRIPTION + +The `nng_random()` returns a random number. +The value returned is suitable for use with cryptographic functions such as +key generation. +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/reference/src/api/util/nng_strerror.md b/docs/reference/src/api/util/nng_strerror.md new file mode 100644 index 00000000..145fd0bc --- /dev/null +++ b/docs/reference/src/api/util/nng_strerror.md @@ -0,0 +1,48 @@ += nng_strerror(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_strerror - return an error description + +== SYNOPSIS + +[source, c] +---- +#include <nng/nng.h> + +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)] |
