diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-11-03 08:38:22 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-11-03 08:49:33 -0800 |
| commit | 4367013d8b56105edd0d27d0b9b6da2becab9717 (patch) | |
| tree | 1bc6abaaff5b010adc415b3ab25698b59e73f353 /docs/man/nng_stream_dialer_get.3str.adoc | |
| parent | 8249242a9325a27e57107d78bfa168e918cc4f7a (diff) | |
| download | nng-4367013d8b56105edd0d27d0b9b6da2becab9717.tar.gz nng-4367013d8b56105edd0d27d0b9b6da2becab9717.tar.bz2 nng-4367013d8b56105edd0d27d0b9b6da2becab9717.zip | |
Remove untyped stream option functions.
The underlying stream APIs have no need for untyped accessors.
Another step on the road to removal of NNI_TYPE_OPAQUE.
Diffstat (limited to 'docs/man/nng_stream_dialer_get.3str.adoc')
| -rw-r--r-- | docs/man/nng_stream_dialer_get.3str.adoc | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/docs/man/nng_stream_dialer_get.3str.adoc b/docs/man/nng_stream_dialer_get.3str.adoc index 4023e56f..13813c1f 100644 --- a/docs/man/nng_stream_dialer_get.3str.adoc +++ b/docs/man/nng_stream_dialer_get.3str.adoc @@ -20,8 +20,6 @@ nng_stream_dialer_get - get option from byte stream dialer ---- #include <nng/nng.h> -int nng_stream_dialer_get(nng_stream_dialer *d, const char *opt, void *val, size_t *sizep); - int nng_stream_dialer_get_bool(nng_stream_dialer *d, const char *opt, bool *valp); int nng_stream_dialer_get_int(nng_stream_dialer *d, const char *opt, int *valp); @@ -42,7 +40,7 @@ int nng_stream_dialer_get_uint64(nng_stream_dialer *d, const char *opt, uint64_t == DESCRIPTION -The `nng_stream_dialer_get()` functions are used to retrieve option values for the +The `nng_stream_dialer_get()` functions are used to retrieve option values for the xref:nng_stream_dialer.5.adoc[byte stream dialer] _d_. The actual options that may be retrieved in this way vary. @@ -58,26 +56,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_stream_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 -_sizep_. -+ -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 _sizep_. -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 _sizep_ does not exceed the original buffer size. -+ -It is acceptable to pass `NULL` for _val_ if the value in _sizep_ 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_stream_dialer_get_bool()`:: This function is for options which take a Boolean (`bool`). |
