aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2024-11-03 09:15:48 -0800
committerGarrett D'Amore <garrett@damore.org>2024-11-03 09:17:08 -0800
commitc77e32bc6da45a2c20b70451a6fb9d0caf636c75 (patch)
treee4adca494a120f37460c1f79c5f122c6ee65ffae /docs
parentfb7f83b4c6f371372f742ff45f5efb8e83374f8c (diff)
downloadnng-c77e32bc6da45a2c20b70451a6fb9d0caf636c75.tar.gz
nng-c77e32bc6da45a2c20b70451a6fb9d0caf636c75.tar.bz2
nng-c77e32bc6da45a2c20b70451a6fb9d0caf636c75.zip
Remove untyped nng_dialer_get/set and nng_listener_get/set.
Diffstat (limited to 'docs')
-rw-r--r--docs/man/nng_dialer_get.3.adoc24
-rw-r--r--docs/man/nng_dialer_set.3.adoc13
-rw-r--r--docs/man/nng_listener_get.3.adoc26
-rw-r--r--docs/man/nng_listener_set.3.adoc14
-rw-r--r--docs/man/nng_zerotier.7.adoc2
-rw-r--r--docs/ref/migrate/nng1.md4
6 files changed, 11 insertions, 72 deletions
diff --git a/docs/man/nng_dialer_get.3.adoc b/docs/man/nng_dialer_get.3.adoc
index e23ecd2c..29c0341a 100644
--- a/docs/man/nng_dialer_get.3.adoc
+++ b/docs/man/nng_dialer_get.3.adoc
@@ -1,6 +1,6 @@
= nng_dialer_get(3)
//
-// Copyright 2020 Staysail Systems, Inc. <info@staysail.tech>
+// 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
@@ -19,8 +19,6 @@ nng_dialer_get - get dialer option
----
#include <nng/nng.h>
-int nng_dialer_get(nng_dialer d, const char *opt, void *val, size_t *valszp);
-
int nng_dialer_get_bool(nng_dialer d, const char *opt, bool *bvalp);
int nng_dialer_get_int(nng_dialer d, const char *opt, int *ivalp);
@@ -57,26 +55,6 @@ The forms vary based on the type of the option they take.
The details of the type, size, and semantics of the option will depend
on the actual option, and will be documented with the option itself.
-`nng_dialer_get()`::
-This function is untyped and can be used to retrieve the value of any option.
-The caller must store a pointer to a buffer to receive the value in _val_,
-and the size of the buffer shall be stored at the location referenced
-by _valszp_. +
- +
-When the function returns, the actual size of the data copied (or that
-would have been copied if sufficient space were present) is stored at
-the location referenced by _valszp_.
-If the caller's buffer is not large
-enough to hold the entire object, then the copy is truncated.
-Therefore the caller should validate that the returned size in _valszp_ does not
-exceed the original buffer size to check for truncation. +
- +
-It is acceptable to pass `NULL` for _val_ if the value in _valszp_ is zero.
-This can be used to determine the size of the buffer needed to receive
-the object.
-
-TIP: It may be easier to use one of the typed forms of this function.
-
`nng_dialer_get_bool()`::
This function is for options which take a Boolean (`bool`).
The value will be stored at _bvalp_.
diff --git a/docs/man/nng_dialer_set.3.adoc b/docs/man/nng_dialer_set.3.adoc
index 3363eae9..82673959 100644
--- a/docs/man/nng_dialer_set.3.adoc
+++ b/docs/man/nng_dialer_set.3.adoc
@@ -19,9 +19,6 @@ nng_dialer_set - set dialer option
----
#include <nng/nng.h>
-int nng_dialer_set(nng_dialer d, const char *opt, const void *val,
- size_t valsz);
-
int nng_dialer_set_bool(nng_dialer d, const char *opt, bool bval);
int nng_dialer_set_int(nng_dialer d, const char *opt, int ival);
@@ -35,13 +32,12 @@ int nng_dialer_set_size(nng_dialer d, const char *opt, size_t z);
int nng_dialer_set_string(nng_dialer d, const char *opt, const char *str);
int nng_dialer_set_uint64(nng_dialer d, const char *opt, uint64_t u64);
-
----
== DESCRIPTION
(((options, dialer)))
-The `nng_dialer_set()` functions are used to configure options for
+The `nng_dialer_set` functions are used to configure options for
the xref:nng_dialer.5.adoc[dialer] _d_.
The actual options that may be configured in this way
vary, and many are documented in xref:nng_options.5.adoc[nng_options(5)].
@@ -58,13 +54,6 @@ In all of these forms, the option _opt_ is configured on the dialer _d_.
The details of the type, size, and semantics of the option will depend
on the actual option, and will be documented with the option itself.
-`nng_dialer_set()`::
-This function is untyped, and can be used to configure any arbitrary data.
-The _val_ pointer addresses the data to copy, and _valsz_ is the
-size of the objected located at _val_.
-
-TIP: It may be easier to use one of the typed forms of this function.
-
`nng_dialer_set_bool()`::
This function is for options which take a Boolean (`bool`).
The _bval_ is passed to the option.
diff --git a/docs/man/nng_listener_get.3.adoc b/docs/man/nng_listener_get.3.adoc
index 83ae6986..216a28f6 100644
--- a/docs/man/nng_listener_get.3.adoc
+++ b/docs/man/nng_listener_get.3.adoc
@@ -1,6 +1,6 @@
= nng_listener_get(3)
//
-// Copyright 2020 Staysail Systems, Inc. <info@staysail.tech>
+// 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
@@ -19,8 +19,6 @@ nng_listener_get - get listener option
----
#include <nng/nng.h>
-int nng_listener_get(nng_listener l, const char *opt, void *val, size_t *valszp);
-
int nng_listener_get_bool(nng_listener l, const char *opt, bool *bvalp);
int nng_listener_get_int(nng_listener l, const char *opt, int *ivalp);
@@ -42,7 +40,7 @@ int nng_listener_get_uint64(nng_listener l, const char *opt, uint64_t *u64p);
== DESCRIPTION
(((options, listener)))
-The `nng_listener_get()` functions are used to retrieve option values for
+The `nng_listener_get` functions are used to retrieve option values for
the xref:nng_listener.5.adoc[listener] _l_.
The actual options that may be retrieved in this way
vary, and many are documented in xref:nng_options.5.adoc[nng_options(5)].
@@ -57,26 +55,6 @@ The forms vary based on the type of the option they take.
The details of the type, size, and semantics of the option will depend
on the actual option, and will be documented with the option itself.
-`nng_listener_get()`::
-This function is untyped and can be used to retrieve the value of any option.
-The caller must store a pointer to a buffer to receive the value in _val_,
-and the size of the buffer shall be stored at the location referenced
-by _valszp_. +
- +
-When the function returns, the actual size of the data copied (or that
-would have been copied if sufficient space were present) is stored at
-the location referenced by _valszp_.
-If the caller's buffer is not large
-enough to hold the entire object, then the copy is truncated. Therefore
-the caller should validate that the returned size in _valszp_ does not
-exceed the original buffer size to check for truncation. +
- +
-It is acceptable to pass `NULL` for _val_ if the value in _valszp_ is zero.
-This can be used to determine the size of the buffer needed to receive
-the object.
-
-TIP: It may be easier to use one of the typed forms of this function.
-
`nng_listener_get_bool()`::
This function is for options which take a Boolean (`bool`).
The value will be stored at _bvalp_.
diff --git a/docs/man/nng_listener_set.3.adoc b/docs/man/nng_listener_set.3.adoc
index 0cfd2112..37c9b48e 100644
--- a/docs/man/nng_listener_set.3.adoc
+++ b/docs/man/nng_listener_set.3.adoc
@@ -1,6 +1,6 @@
= nng_listener_set(3)
//
-// Copyright 2020 Staysail Systems, Inc. <info@staysail.tech>
+// 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
@@ -19,9 +19,6 @@ nng_listener_set - set listener option
----
#include <nng/nng.h>
-int nng_listener_set(nng_listener l, const char *opt, const void *val,
- size_t valsz);
-
int nng_listener_set_bool(nng_listener l, const char *opt, bool bval);
int nng_listener_set_int(nng_listener l, const char *opt, int ival);
@@ -41,7 +38,7 @@ int nng_listener_set_uint64(nng_listener l, const char *opt, uint64_t u64);
== DESCRIPTION
(((options, listener)))
-The `nng_listener_set()` functions are used to configure options for
+The `nng_listener_set` functions are used to configure options for
the xref:nng_listener.5.adoc[listener] _l_.
The actual options that may be configured in this way
vary, and many are documented in xref:nng_options.5.adoc[nng_options(5)].
@@ -58,13 +55,6 @@ In all of these forms, the option _opt_ is configured on the listener _l_.
The details of the type, size, and semantics of the option will depend
on the actual option, and will be documented with the option itself.
-TIP: It may be easier to use one of the typed forms of this function.
-
-`nng_listener_set()`::
-This function is untyped, and can be used to configure any arbitrary data.
-The _val_ pointer addresses the data to copy, and _valsz_ is the
-size of the objected located at _val_.
-
`nng_listener_set_bool()`::
This function is for options which take a Boolean (`bool`).
The _bval_ is passed to the option.
diff --git a/docs/man/nng_zerotier.7.adoc b/docs/man/nng_zerotier.7.adoc
index 40c048d6..0f98b33d 100644
--- a/docs/man/nng_zerotier.7.adoc
+++ b/docs/man/nng_zerotier.7.adoc
@@ -64,7 +64,7 @@ the node's own node number.
Listeners may use port 0 to indicate that a suitable port
number be selected automatically.
Applications using this must determine the selected port number using the
-xref:nng_listener_get.3.adoc[`nng_listener_get()`] function.
+xref:nng_listener_get.3.adoc[`nng_listener_get_int()`] function.
=== Socket Address
diff --git a/docs/ref/migrate/nng1.md b/docs/ref/migrate/nng1.md
index f4c9c9f5..1c01e429 100644
--- a/docs/ref/migrate/nng1.md
+++ b/docs/ref/migrate/nng1.md
@@ -61,6 +61,10 @@ such as one ending in a suffix like `_bool` (to access a `bool` typed option).
- `nng_ctx_get`
- `nng_ctx_set`
+- `nng_dialer_get`
+- `nng_dialer_set`
+- `nng_listener_get`
+- `nng_listener_set`
- `nng_pipe_get`
- `nng_stream_get`
- `nng_stream_set`