aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/man/nng_socket_get.3.adoc26
-rw-r--r--docs/man/nng_socket_set.3.adoc14
-rw-r--r--docs/ref/migrate/nng1.md2
3 files changed, 6 insertions, 36 deletions
diff --git a/docs/man/nng_socket_get.3.adoc b/docs/man/nng_socket_get.3.adoc
index e304964a..cca1dc5a 100644
--- a/docs/man/nng_socket_get.3.adoc
+++ b/docs/man/nng_socket_get.3.adoc
@@ -1,6 +1,6 @@
= nng_socket_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_socket_get - get socket option
----
#include <nng/nng.h>
-int nng_socket_get(nng_socket s, const char *opt, void *val, size_t *valszp);
-
int nng_socket_get_bool(nng_socket s, const char *opt, bool *bvalp);
int nng_socket_get_int(nng_socket s, const char *opt, int *ivalp);
@@ -42,7 +40,7 @@ int nng_socket_get_addr(nng_socket s, const char *opt, nng_sockaddr *addrp);
== DESCRIPTION
(((options, socket)))
-The `nng_socket_get()` functions are used to retrieve option values for
+The `nng_socket_get` functions are used to retrieve option values for
the xref:nng_socket.5.adoc[socket] _s_.
The actual options that may be retrieved in this way vary.
A number of them are documented in xref:nng_options.5.adoc[nng_options(5)].
@@ -62,26 +60,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_socket_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 check for truncation by verifying that the
-returned size in _valszp_ does not exceed the original buffer size.
-+
-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_socket_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_socket_set.3.adoc b/docs/man/nng_socket_set.3.adoc
index aa5784f3..bd3f7f47 100644
--- a/docs/man/nng_socket_set.3.adoc
+++ b/docs/man/nng_socket_set.3.adoc
@@ -1,6 +1,6 @@
= nng_socket_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,8 +19,6 @@ nng_socket_set - set socket option
----
#include <nng/nng.h>
-int nng_socket_set(nng_socket s, const char *opt, const void *val, size_t valsz);
-
int nng_socket_set_bool(nng_socket s, const char *opt, bool bval);
int nng_socket_set_int(nng_socket s, const char *opt, int ival);
@@ -34,12 +32,11 @@ int nng_socket_set_size(nng_socket s, const char *opt, size_t z);
int nng_socket_set_string(nng_socket s, const char *opt, const char *str);
int nng_socket_set_uint64(nng_socket s, const char *opt, uint64_t u64);
-
----
== DESCRIPTION
(((options, socket)))
-The `nng_socket_set()` functions are used to configure options for
+The `nng_socket_set` functions are used to configure options for
the socket _s_.
The actual options that may be configured in this way vary, and are
specified by _opt_.
@@ -57,13 +54,6 @@ xref:nng_listener_set.3.adoc[nng_listener_get] for specific dialers or listeners
The details of the type, size, and semantics of the option will depend
on the actual option, and is documented with the option itself.
-`nng_socket_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_socket_set_bool()`::
This function is for options which take a Boolean (`bool`).
The _bval_ is passed to the option.
diff --git a/docs/ref/migrate/nng1.md b/docs/ref/migrate/nng1.md
index 1c01e429..f44deb7c 100644
--- a/docs/ref/migrate/nng1.md
+++ b/docs/ref/migrate/nng1.md
@@ -66,6 +66,8 @@ such as one ending in a suffix like `_bool` (to access a `bool` typed option).
- `nng_listener_get`
- `nng_listener_set`
- `nng_pipe_get`
+- `nng_socket_get`
+- `nng_socket_set`
- `nng_stream_get`
- `nng_stream_set`
- `nng_stream_dialer_get`