diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-10-28 15:53:23 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-10-28 16:13:11 -0700 |
| commit | 801ace5e9adca4e53497d6c7133cc32cf94b23b7 (patch) | |
| tree | 8bbfb96e513fedce9b2cb29672f99fce0c5d54bd /docs | |
| parent | caa0c875339badd5a0da38aee9605a40cb7e9d83 (diff) | |
| download | nng-801ace5e9adca4e53497d6c7133cc32cf94b23b7.tar.gz nng-801ace5e9adca4e53497d6c7133cc32cf94b23b7.tar.bz2 nng-801ace5e9adca4e53497d6c7133cc32cf94b23b7.zip | |
Remove nng_stream_set function family.
This was not really used or useful.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/man/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | docs/man/libnng.3.adoc | 1 | ||||
| -rw-r--r-- | docs/man/nng_stream.5.adoc | 7 | ||||
| -rw-r--r-- | docs/man/nng_stream_get.3str.adoc | 3 | ||||
| -rw-r--r-- | docs/man/nng_stream_set.3str.adoc | 112 | ||||
| -rw-r--r-- | docs/ref/migrate/nng1.md | 13 |
6 files changed, 16 insertions, 121 deletions
diff --git a/docs/man/CMakeLists.txt b/docs/man/CMakeLists.txt index e25ab977..4031889d 100644 --- a/docs/man/CMakeLists.txt +++ b/docs/man/CMakeLists.txt @@ -281,7 +281,6 @@ if (NNG_ENABLE_DOC) nng_stream_get nng_stream_recv nng_stream_send - nng_stream_set nng_stream_dialer_alloc nng_stream_dialer_close nng_stream_dialer_dial diff --git a/docs/man/libnng.3.adoc b/docs/man/libnng.3.adoc index c26913be..65ecac55 100644 --- a/docs/man/libnng.3.adoc +++ b/docs/man/libnng.3.adoc @@ -337,7 +337,6 @@ xref:nng_stream_listener.5.adoc[`nng_stream_listener`] objects. |xref:nng_stream_listener_set.3str.adoc[nng_stream_listener_set()]|set option on byte stream listener |xref:nng_stream_recv.3str.adoc[nng_stream_recv()]|receive from byte stream |xref:nng_stream_send.3str.adoc[nng_stream_send()]|send to byte stream -|xref:nng_stream_set.3str.adoc[nng_stream_set()]|set option on byte stream |=== === HTTP Support diff --git a/docs/man/nng_stream.5.adoc b/docs/man/nng_stream.5.adoc index 9144deb5..b3921e46 100644 --- a/docs/man/nng_stream.5.adoc +++ b/docs/man/nng_stream.5.adoc @@ -57,12 +57,10 @@ using xref:nng_stream_close.3str.adoc[`nng_stream_close()`]. Byte streams may, depending on the underlying technology, -support various +support various read-only xref:nng_options.5.adoc[options], which can be accessed using the -xref:nng_stream_get.3str.adoc[`nng_stream_get()`] and -xref:nng_stream_set.3str.adoc[`nng_stream_set()`] family of -functions. +xref:nng_stream_get.3str.adoc[`nng_stream_get()`]. == SEE ALSO @@ -75,6 +73,5 @@ xref:nng_stream_get.3str.adoc[nng_stream_get(3str)], xref:nng_stream_listener_accept.3str.adoc[nng_stream_listener_accept(3str)], xref:nng_stream_recv.3str.adoc[nng_stream_recv(3str)], xref:nng_stream_send.3str.adoc[nng_stream_send(3str)], -xref:nng_stream_set.3str.adoc[nng_stream_set(3str)], xref:nng_options.5.adoc[nng_options(5)], xref:nng.7.adoc[nng(7)], diff --git a/docs/man/nng_stream_get.3str.adoc b/docs/man/nng_stream_get.3str.adoc index 606fcc09..64ff626f 100644 --- a/docs/man/nng_stream_get.3str.adoc +++ b/docs/man/nng_stream_get.3str.adoc @@ -42,7 +42,7 @@ int nng_stream_get_uint64(nng_stream *s, const char *opt, uint64_t *valp); == DESCRIPTION -The `nng_stream_get()` functions are used to retrieve option values for the +The `nng_stream_get()` functions are used to retrieve option values for the xref:nng_stream.5.adoc[byte stream] _conn_. The actual options that may be retrieved in this way vary. @@ -138,7 +138,6 @@ This function returns 0 on success, and non-zero otherwise. [.text-left] xref:nng_strerror.3.adoc[nng_strerror(3)], -xref:nng_stream_set.3str.adoc[nng_stream_set(3str)], xref:nng_options.5.adoc[nng_options(5)], xref:nng_ipc_options.5.adoc[nng_ipc_options(5)], xref:nng_tcp_options.5.adoc[nng_tcp_options(5)], diff --git a/docs/man/nng_stream_set.3str.adoc b/docs/man/nng_stream_set.3str.adoc deleted file mode 100644 index 9386168e..00000000 --- a/docs/man/nng_stream_set.3str.adoc +++ /dev/null @@ -1,112 +0,0 @@ -= nng_stream_set(3str) -// -// Copyright 2024 Staysail Systems, Inc. <info@staysail.tech> -// Copyright 2018 Capitar IT Group BV <info@capitar.com> -// Copyright 2019 Devolutions <info@devolutions.net> -// -// 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_stream_set - set option on byte stream - -== SYNOPSIS - -[source, c] ----- -#include <nng/nng.h> - -int nng_stream_set(nng_stream *s, const char *name, const void *data, size_t size); - -int nng_stream_set_bool(nng_stream *s, const char *opt, bool val); - -int nng_stream_set_int(nng_stream *s, const char *opt, int val); - -int nng_stream_set_ms(nng_stream *s, const char *opt, nng_duration val); - -int nng_stream_set_size(nng_stream *s, const char *opt, size_t val); - -int nng_stream_set_string(nng_stream *s, const char *opt, const char *val); - -int nng_stream_set_uint64(nng_stream *s, const char *opt, uint64_t val); - ----- - -== DESCRIPTION - -The `nng_stream_set()` functions are used to configure options for the -xref:nng_stream.5.adoc[byte stream] _s_. -The actual options that may be configured in this way vary, and are -specified by _opt_. -A number of them are documented in -xref:nng_options.5.adoc[nng_options(5)]. - -Additionally some transport-specific and protocol-specific options are -documented with the transports and protocols themselves. - -=== Forms - -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_stream_set()`:: -This function is untyped, and can be used to configure any arbitrary data. -The _val_ pointer addresses the data to copy, and _size_ 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_stream_set_bool()`:: -This function is for options which take a Boolean (`bool`). - -`nng_stream_set_int()`:: -This function is for options which take an integer (`int`). - -`nng_stream_set_ms()`:: -This function is used to configure time durations (such as timeouts) using -the type -xref:nng_duration.5.adoc[`nng_duration`]. -The duration is an integer number of milliseconds. - -`nng_stream_set_size()`:: -This function is used to configure a size, typically for buffer sizes, -message maximum sizes, and similar options. - -`nng_stream_set_string()`:: -This function is used to pass configure a string. -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_stream_set_uint64()`:: -This function is used to configure a 64-bit unsigned value/ -This is typically used for identifiers, network numbers, -and similar options. - -== RETURN VALUES - -This function returns 0 on success, and non-zero otherwise. - -== ERRORS - -[horizontal] -`NNG_ECLOSED`:: The connection is closed. -`NNG_EINVAL`:: Either _data_ or _size_ are invalid. -`NNG_ENOTSUP`:: The option is not supported. -`NNG_EREADONLY`:: The option may not be modified. - -== SEE ALSO - -[.text-left] -xref:nng_strerror.3.adoc[nng_strerror(3)], -xref:nng_stream_get.3str.adoc[nng_stream_get(3str)], -xref:nng_options.5.adoc[nng_options(5)], -xref:nng_ipc_options.5.adoc[nng_ipc_options(5)], -xref:nng_tcp_options.5.adoc[nng_tcp_options(5)], -xref:nng_tls_options.5.adoc[nng_tls_options(5)], -xref:nng_stream.5.adoc[nng_stream(5)] diff --git a/docs/ref/migrate/nng1.md b/docs/ref/migrate/nng1.md index 35224bb8..0e2c9a48 100644 --- a/docs/ref/migrate/nng1.md +++ b/docs/ref/migrate/nng1.md @@ -40,6 +40,8 @@ and similar has been removed. Instead configuration must be performed by allocat a `nng_tls_config` object, and then setting fields on it using the appropriate functions, after which it may be configured on a listener or dialer using the `NNG_OPT_TLS_CONFIG` option. +Note that TLS configuration is now available in `<nng/nng.h>`, rather than the supplemental header. + ## Option Functions The previously deprecated `nng_pipe_getopt_xxx` family of functions is removed. @@ -48,6 +50,17 @@ Applications should use `nng_pipe_get` and related functions instead. The socket option function families for `nng_getopt` and `nng_setopt` have been removed as well. In this case, use the `nng_socket_get` and `nng_socket_set` functions as appropriate. +The `_getopt` and `_setopt` functions for contexts, listeners, and dialers are no longer +present. Simply changing `_getopt` to `_get` or `_setopt` to `_set` in the function name +should be sufficient in most cases. + +## Stream Options + +The ability to set options on streams after they have been created is no longer present. +(It turns out that this was not very useful.) All functions `nng_stream_set_xxx` are removed. +For tuning the `NNG_OPT_TCP_NODELAY` or similar properties, set the option on the listener +or dialer that creates the stream instead. + ## Transport Options A number of transport options can no longer be set on the socket. Instead these |
