diff options
| author | Garrett D'Amore <garrett@damore.org> | 2019-01-21 22:40:10 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2019-02-16 19:22:27 -0800 |
| commit | 5cf750697624d4fd63cfe26921209d7c30e1a2d2 (patch) | |
| tree | bf11695e5f1ec5e400c87da0cc6ff23935a2eeff /docs/man/nng_getopt.3.adoc | |
| parent | ca655b9db689ee0e655248b1a9f166b8db6cc984 (diff) | |
| download | nng-5cf750697624d4fd63cfe26921209d7c30e1a2d2.tar.gz nng-5cf750697624d4fd63cfe26921209d7c30e1a2d2.tar.bz2 nng-5cf750697624d4fd63cfe26921209d7c30e1a2d2.zip | |
fixes #872 create unified nng_stream API
This is a major change, and includes changes to use a polymorphic
stream API for all transports. There have been related bugs fixed
along the way. Additionally the man pages have changed.
The old non-polymorphic APIs are removed now. This is a breaking
change, but the old APIs were never part of any released public API.
Diffstat (limited to 'docs/man/nng_getopt.3.adoc')
| -rw-r--r-- | docs/man/nng_getopt.3.adoc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/man/nng_getopt.3.adoc b/docs/man/nng_getopt.3.adoc index 06d6ac19..491d6038 100644 --- a/docs/man/nng_getopt.3.adoc +++ b/docs/man/nng_getopt.3.adoc @@ -59,25 +59,25 @@ on the actual option, and will be documented with the option itself. 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_. + - + +_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. + - + +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_getopt_bool()`:: This function is for options which take a Boolean (`bool`). -The value will be stored at _ivalp_. +The value will be stored at _bvalp_. `nng_getopt_int()`:: This function is for options which take an integer (`int`). |
