aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2024-11-24 09:11:25 -0800
committerGarrett D'Amore <garrett@damore.org>2024-11-24 10:08:09 -0800
commit569ef3e13fee995aae2905474b70d58055c8132c (patch)
tree06b1e0f76ea0a6ddc06339822bc2c9e7155c375c /docs
parentcc3b5fe459d277ee46277bc26301249f57855470 (diff)
downloadnng-569ef3e13fee995aae2905474b70d58055c8132c.tar.gz
nng-569ef3e13fee995aae2905474b70d58055c8132c.tar.bz2
nng-569ef3e13fee995aae2905474b70d58055c8132c.zip
Remove string option functions from sockets and contexts.
These are not needed anymore, and the semantics of string accessors is brittle, so we want to eliminate these as much as possible.
Diffstat (limited to 'docs')
-rw-r--r--docs/man/nng_ctx_get.3.adoc8
-rw-r--r--docs/man/nng_ctx_set.3.adoc2
-rw-r--r--docs/man/nng_socket_get.3.adoc8
-rw-r--r--docs/man/nng_socket_set.3.adoc9
-rw-r--r--docs/ref/migrate/nng1.md4
5 files changed, 4 insertions, 27 deletions
diff --git a/docs/man/nng_ctx_get.3.adoc b/docs/man/nng_ctx_get.3.adoc
index 92393e05..fa342d2b 100644
--- a/docs/man/nng_ctx_get.3.adoc
+++ b/docs/man/nng_ctx_get.3.adoc
@@ -27,8 +27,6 @@ int nng_ctx_get_ms(nng_ctx ctx, const char *opt, nng_duration *durp);
int nng_ctx_get_size(nng_ctx ctx, const char *opt, size_t *zp);
-int nng_ctx_get_string(nng_ctx ctx, const char *opt, char **strp);
-
int nng_ctx_get_uint64(nng_ctx ctx, const char *opt, uint64_t *u64p);
----
@@ -70,12 +68,6 @@ the special value ((`NNG_DURATION_DEFAULT`)) means a context-specific default.)
This function is used to retrieve a size into the pointer _zp_,
typically for buffer sizes, message maximum sizes, and similar options.
-`nng_ctx_get_string()`::
-This function is used to retrieve a string into _strp_.
-This string is created from the source using xref:nng_strdup.3.adoc[`nng_strdup()`]
-and consequently must be freed by the caller using
-xref:nng_strfree.3.adoc[`nng_strfree()`] when it is no longer needed.
-
`nng_ctx_get_uint64()`::
This function is used to retrieve a 64-bit unsigned value into the value
referenced by _u64p_.
diff --git a/docs/man/nng_ctx_set.3.adoc b/docs/man/nng_ctx_set.3.adoc
index 1a7f7033..95539a63 100644
--- a/docs/man/nng_ctx_set.3.adoc
+++ b/docs/man/nng_ctx_set.3.adoc
@@ -27,8 +27,6 @@ int nng_ctx_set_ms(nng_ctx ctx, const char *opt, nng_duration dur);
int nng_ctx_set_size(nng_ctx ctx, const char *opt, size_t z);
-int nng_ctx_set_string(nng_ctx ctx, const char *opt, const char *str);
-
int nng_ctx_set_uint64(nng_ctx ctx, const char *opt, uint64_t u64);
----
diff --git a/docs/man/nng_socket_get.3.adoc b/docs/man/nng_socket_get.3.adoc
index f510eb39..bda37836 100644
--- a/docs/man/nng_socket_get.3.adoc
+++ b/docs/man/nng_socket_get.3.adoc
@@ -27,8 +27,6 @@ int nng_socket_get_size(nng_socket s, const char *opt, size_t *zp);
int nng_socket_get_uint64(nng_socket s, const char *opt, uint64_t *u64p);
-int nng_socket_get_string(nng_socket s, const char *opt, char **strp);
-
int nng_socket_get_ms(nng_socket s, const char *opt, nng_duration *durp);
int nng_socket_get_addr(nng_socket s, const char *opt, nng_sockaddr *addrp);
@@ -71,12 +69,6 @@ the special value ((`NNG_DURATION_DEFAULT`)) means a context-specific default.)
This function is used to retrieve a size into the pointer _zp_,
typically for buffer sizes, message maximum sizes, and similar options.
-`nng_socket_get_string()`::
-This function is used to retrieve a string into _strp_.
-This string is created from the source using xref:nng_strdup.3.adoc[`nng_strdup()`]
-and consequently must be freed by the caller using
-xref:nng_strfree.3.adoc[`nng_strfree()`] when it is no longer needed.
-
`nng_socket_get_uint64()`::
This function is used to retrieve a 64-bit unsigned value into the value
referenced by _u64p_.
diff --git a/docs/man/nng_socket_set.3.adoc b/docs/man/nng_socket_set.3.adoc
index b787436f..897e9124 100644
--- a/docs/man/nng_socket_set.3.adoc
+++ b/docs/man/nng_socket_set.3.adoc
@@ -27,8 +27,6 @@ int nng_socket_set_ms(nng_socket s, const char *opt, nng_duration dur);
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);
----
@@ -64,13 +62,6 @@ The duration _dur_ is an integer number of milliseconds.
This function is used to configure a size, _z_, typically for buffer sizes,
message maximum sizes, and similar options.
-`nng_socket_set_string()`::
-This function is used to pass configure a string, _str_.
-Strings passed this way must be legal UTF-8 or ASCII strings, terminated
-with a `NUL` (`\0`) byte.
-(Other constraints may apply as well, see the documentation for each option
-for details.)
-
`nng_socket_set_uint64()`::
This function is used to configure a 64-bit unsigned value, _u64_.
This is typically used for options related to identifiers, network numbers,
diff --git a/docs/ref/migrate/nng1.md b/docs/ref/migrate/nng1.md
index f704c1f6..eac60379 100644
--- a/docs/ref/migrate/nng1.md
+++ b/docs/ref/migrate/nng1.md
@@ -90,8 +90,12 @@ should be sufficient in most cases.
The following functions served no useful purpose (after other changes described in this document),
and are thus removed:
+- `nng_ctx_get_string`
+- `nng_ctx_set_string`
- `nng_socket_get_ptr`
- `nng_socket_set_ptr`
+- `nng_socket_get_string`
+- `nng_socket_set_string`
- `nng_ctx_get_ptr` (not documented)
- `nng_ctx_set_ptr` (not documented)