aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/man/nng_getopt.3.adoc10
-rw-r--r--docs/man/nng_setopt.3.adoc9
2 files changed, 15 insertions, 4 deletions
diff --git a/docs/man/nng_getopt.3.adoc b/docs/man/nng_getopt.3.adoc
index ef69103c..5bb151c8 100644
--- a/docs/man/nng_getopt.3.adoc
+++ b/docs/man/nng_getopt.3.adoc
@@ -21,6 +21,8 @@ nng_getopt - get socket option
int nng_getopt(nng_socket s, const char *opt, void *val, size_t *valszp);
+int nng_getopt_bool(nng_socket s, const char *opt, bool *bvalp);
+
int nng_getopt_int(nng_socket s, const char *opt, int *ivalp);
int nng_getopt_ms(nng_socket s, const char *opt, nng_duration *durp);
@@ -72,11 +74,15 @@ 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.
+`nng_getopt_bool()`::
+
+This function is for options which take a boolean (`bool`).
+The value will be stored at _ivalp_.
+
`nng_getopt_int()`::
-This function is for options which take an integer (`int`) or boolean (`bool`).
+This function is for options which take an integer (`int`).
The value will be stored at _ivalp_.
-For booleans the value will be eiher 0 (`false`) or 1 (`true`).
`nng_getopt_ms()`::
This function is used to retrieve time durations
diff --git a/docs/man/nng_setopt.3.adoc b/docs/man/nng_setopt.3.adoc
index 95284852..201181cc 100644
--- a/docs/man/nng_setopt.3.adoc
+++ b/docs/man/nng_setopt.3.adoc
@@ -21,6 +21,8 @@ nng_setopt - set socket option
int nng_setopt(nng_socket s, const char *opt, const void *val, size_t valsz);
+int nng_setopt_bool(nng_socket s, const char *opt, int bval);
+
int nng_setopt_int(nng_socket s, const char *opt, int ival);
int nng_setopt_ms(nng_socket s, const char *opt, nng_duration dur);
@@ -59,10 +61,13 @@ 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_.
+`nng_setopt_bool()`::
+This function is for options which take a boolean (`bool`).
+The _bval_ is passed to the option.
+
`nng_setopt_int()`::
-This function is for options which take an integer (`int`) or boolean (`bool`).
+This function is for options which take an integer (`int`).
The _ival_ is passed to the option.
-For booleans pass either 0 (`false`) or 1 (`true`).
`nng_setopt_ms()`::
This function is used to configure time durations (such as timeouts) using