diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/man/nng_ctx_getopt.3.adoc | 26 | ||||
| -rw-r--r-- | docs/man/nng_ctx_setopt.3.adoc | 19 | ||||
| -rw-r--r-- | docs/man/nng_dialer_getopt.3.adoc | 32 | ||||
| -rw-r--r-- | docs/man/nng_dialer_setopt.3.adoc | 25 | ||||
| -rw-r--r-- | docs/man/nng_getopt.3.adoc | 28 | ||||
| -rw-r--r-- | docs/man/nng_listener_getopt.3.adoc | 31 | ||||
| -rw-r--r-- | docs/man/nng_listener_setopt.3.adoc | 21 | ||||
| -rw-r--r-- | docs/man/nng_pipe_getopt.3.adoc | 41 | ||||
| -rw-r--r-- | docs/man/nng_setopt.3.adoc | 24 |
9 files changed, 118 insertions, 129 deletions
diff --git a/docs/man/nng_ctx_getopt.3.adoc b/docs/man/nng_ctx_getopt.3.adoc index 6dd190e5..8c708dc6 100644 --- a/docs/man/nng_ctx_getopt.3.adoc +++ b/docs/man/nng_ctx_getopt.3.adoc @@ -53,51 +53,51 @@ 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. -TIP: Generally, it will be easier to use one of the typed forms instead. - -==== `nng_ctx_getopt()` +`nng_ctx_getopt()`:: 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. -==== `nng_ctx_getopt_bool()` +TIP: It may be easier to use one of the typed forms of this function. + +`nng_ctx_getopt_bool()`:: This function is for options which take a Boolean (`bool`). The value will be stored at _ivalp_. -==== `nng_ctx_getopt_int()` +`nng_ctx_getopt_int()`:: This function is for options which take an integer (`int`). The value will be stored at _ivalp_. -==== `nng_ctx_getopt_ms()` +`nng_ctx_getopt_ms()`:: This function is used to retrieve time <<nng_duration.5#,durations>> (such as timeouts), stored in _durp_ as a number of milliseconds. (The special value ((`NNG_DUR_INFINITE`)) means an infinite amount of time, and the special value ((`NNG_DUR_DEFAULT`)) means a context-specific default.) -==== `nng_ctx_getopt_size()` +`nng_ctx_getopt_size()`:: This function is used to retrieve a size into the pointer _zp_, typically for buffer sizes, message maximum sizes, and similar options. -==== `nng_ctx_getopt_string()` +`nng_ctx_getopt_string()`:: This function is used to retrieve a string into _strp_. This string is created from the source using `<<nng_strdup.3#,nng_strdup()>>` and consequently must be freed by the caller using `<<nng_strfree.3#,nng_strfree()>>` when it is no longer needed. -==== `nng_ctx_getopt_uint64()` +`nng_ctx_getopt_uint64()`:: This function is used to retrieve a 64-bit unsigned value into the value referenced by _u64p_. This is typically used for options related to identifiers, network diff --git a/docs/man/nng_ctx_setopt.3.adoc b/docs/man/nng_ctx_setopt.3.adoc index e9becd75..45f178f8 100644 --- a/docs/man/nng_ctx_setopt.3.adoc +++ b/docs/man/nng_ctx_setopt.3.adoc @@ -49,39 +49,38 @@ The details will be documented with the protocol. 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. -TIP: Generally, it will be easier to use one of the typed versions -of this function. - -==== `nng_ctx_setopt()` +`nng_ctx_setopt()`:: 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_ctx_setopt_bool()` +TIP: It may be easier to use one of the typed forms of this function. + +`nng_ctx_setopt_bool()`:: This function is for options which take a Boolean (`bool`). The _bval_ is passed to the option. -==== `nng_ctx_setopt_int()` +`nng_ctx_setopt_int()`:: This function is for options which take an integer (`int`). The _ival_ is passed to the option. -==== `nng_ctx_setopt_ms()` +`nng_ctx_setopt_ms()`:: This function is used to configure time durations (such as timeouts) using type `<<nng_duration.5#,nng_duration>>`. The duration _dur_ is an integer number of milliseconds. -==== `nng_ctx_setopt_size()` +`nng_ctx_setopt_size()`:: This function is used to configure a size, _z_, typically for buffer sizes, message maximum sizes, and similar options. -==== `nng_ctx_setopt_string()` +`nng_ctx_setopt_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_ctx_setopt_uint64()` +`nng_ctx_setopt_uint64()`:: This function is used to configure a 64-bit unsigned value, _u64_. This is typically used for options related to identifiers, network numbers, and similar. diff --git a/docs/man/nng_dialer_getopt.3.adoc b/docs/man/nng_dialer_getopt.3.adoc index 7d8b03ab..6b2f3c1e 100644 --- a/docs/man/nng_dialer_getopt.3.adoc +++ b/docs/man/nng_dialer_getopt.3.adoc @@ -57,63 +57,61 @@ 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. -TIP: Generally, it will be easier to use one of the typed versions of this -function. - -==== `nng_dialer_getopt()` +`nng_dialer_getopt()`:: 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_. - +by _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 validate that the returned size in _valszp_ does not -exceed the original buffer size to check for truncation. - +exceed the original buffer size to check for truncation. + + + 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_dialer_getopt_bool()` +TIP: It may be easier to use one of the typed forms of this function. + +`nng_dialer_getopt_bool()`:: This function is for options which take a Boolean (`bool`). The value will be stored at _bvalp_. -==== `nng_dialer_getopt_int()` +`nng_dialer_getopt_int()`:: This function is for options which take an integer (`int`). The value will be stored at _ivalp_. -==== `nng_dialer_getopt_ms()` +`nng_dialer_getopt_ms()`:: This function is used to retrieve time <<nng_duration.5#,durations>> (such as timeouts), stored in _durp_ as a number of milliseconds. (The special value ((`NNG_DUR_INFINITE`)) means an infinite amount of time, and the special value ((`NNG_DUR_DEFAULT`)) means a context-specific default.) -==== `nng_dialer_getopt_ptr()` +`nng_dialer_getopt_ptr()`:: This function is used to retrieve a pointer, _ptr_, to structured data. The data referenced by _ptr_ is generally managed using other functions. Note that this form is somewhat special in that the object is generally not copied, but instead the *pointer* to the object is copied. -==== `nng_dialer_getopt_size()` +`nng_dialer_getopt_size()`:: This function is used to retrieve a size into the pointer _zp_, typically for buffer sizes, message maximum sizes, and similar options. -==== `nng_dialer_getopt_sockaddr()` +`nng_dialer_getopt_sockaddr()`:: This function is used to retrieve an `<<nng_sockaddr.5#,nng_sockaddr>>` into the value referenced by _sap_. -==== `nng_dialer_getopt_string()` - +`nng_dialer_getopt_string()`:: This function is used to retrieve a string into _strp_. This string is created from the source using `<<nng_strdup.3#,nng_strdup()>>` and consequently must be freed by the caller using `<<nng_strfree.3#,nng_strfree()>>` when it is no longer needed. -==== `nng_dialer_getopt_uint64()` +`nng_dialer_getopt_uint64()`:: This function is used to retrieve a 64-bit unsigned value into the value referenced by _u64p_. This is typically used for options related to identifiers, network diff --git a/docs/man/nng_dialer_setopt.3.adoc b/docs/man/nng_dialer_setopt.3.adoc index fd62d0ce..01fcb3d4 100644 --- a/docs/man/nng_dialer_setopt.3.adoc +++ b/docs/man/nng_dialer_setopt.3.adoc @@ -58,50 +58,51 @@ In all of these forms, the option _opt_ is configured on the dialer _d_. 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. -TIP: Generally, it will be easier to use one of the typed forms instead. - -==== `nng_dialer_setopt()` +`nng_dialer_setopt()`:: 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_dialer_setopt_bool()` +TIP: It may be easier to use one of the typed forms of this function. + +`nng_dialer_setopt_bool()`:: This function is for options which take a Boolean (`bool`). The _bval_ is passed to the option. -==== `nng_dialer_setopt_int()` +`nng_dialer_setopt_int()`:: This function is for options which take an integer (`int`). The _ival_ is passed to the option. -==== `nng_dialer_setopt_ms()` +`nng_dialer_setopt_ms()`:: This function is used to configure time durations (such as timeouts) using type `<<nng_duration.5#,nng_duration>>`. The duration _dur_ is an integer number of milliseconds. -==== `nng_dialer_setopt_ptr()` +`nng_dialer_setopt_ptr()`:: This function is used to pass a pointer, _ptr_, to structured data. The data referenced by _ptr_ is generally managed by other functions. For example, TLS configuration objects created with (`<<nng_tls_config_alloc.3tls#,nng_tls_config_alloc()>>`) can be passed this way. -Note that this form is somewhat special in that the object is generally + +NOTE: This form is somewhat special in that the object is generally not copied, but instead the *pointer* to the object is copied. -==== `nng_dialer_setopt_size()` +`nng_dialer_setopt_size()`:: This function is used to configure a size, _z_, typically for buffer sizes, message maximum sizes, and similar options. -==== `nng_dialer_setopt_string()` +`nng_dialer_setopt_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_dialer_setopt_uint64()` +`nng_dialer_setopt_uint64()`:: This function is used to configure a 64-bit unsigned value, _u64_. This is typically used for options related to identifiers, network numbers, -and similar. +and such. == RETURN VALUES diff --git a/docs/man/nng_getopt.3.adoc b/docs/man/nng_getopt.3.adoc index 1117d72b..06d6ac19 100644 --- a/docs/man/nng_getopt.3.adoc +++ b/docs/man/nng_getopt.3.adoc @@ -55,57 +55,57 @@ 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. -TIP: Generally, it will be easier to use one of the typed forms instead. - -==== `nng_getopt()` +`nng_getopt()`:: 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. -==== `nng_getopt_bool()` +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_. -==== `nng_getopt_int()` +`nng_getopt_int()`:: This function is for options which take an integer (`int`). The value will be stored at _ivalp_. -==== `nng_getopt_ms()` +`nng_getopt_ms()`:: This function is used to retrieve time <<nng_duration.5#,durations>> (such as timeouts), stored in _durp_ as a number of milliseconds. (The special value ((`NNG_DUR_INFINITE`)) means an infinite amount of time, and the special value ((`NNG_DUR_DEFAULT`)) means a context-specific default.) -==== `nng_getopt_ptr()` +`nng_getopt_ptr()`:: This function is used to retrieve a pointer, _ptr_, to structured data. The data referenced by _ptr_ is generally managed using other functions. Note that this form is somewhat special in that the object is generally not copied, but instead the *pointer* to the object is copied. -==== `nng_getopt_size()` +`nng_getopt_size()`:: This function is used to retrieve a size into the pointer _zp_, typically for buffer sizes, message maximum sizes, and similar options. -==== `nng_getopt_string()` +`nng_getopt_string()`:: This function is used to retrieve a string into _strp_. This string is created from the source using `<<nng_strdup.3#,nng_strdup()>>` and consequently must be freed by the caller using `<<nng_strfree.3#,nng_strfree()>>` when it is no longer needed. -==== `nng_getopt_uint64()` +`nng_getopt_uint64()`:: This function is used to retrieve a 64-bit unsigned value into the value referenced by _u64p_. This is typically used for options related to identifiers, network diff --git a/docs/man/nng_listener_getopt.3.adoc b/docs/man/nng_listener_getopt.3.adoc index 9ffcafa0..ef5129ca 100644 --- a/docs/man/nng_listener_getopt.3.adoc +++ b/docs/man/nng_listener_getopt.3.adoc @@ -57,60 +57,59 @@ 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. -TIP: Generally, it will be easier to use one of the typed versions of this -function. - -==== `nng_listener_getopt()` +`nng_listener_getopt()`:: 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_. - +by _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 validate that the returned size in _valszp_ does not -exceed the original buffer size to check for truncation. - +exceed the original buffer size to check for truncation. + + + 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_listener_getopt_bool()` +TIP: It may be easier to use one of the typed forms of this function. + +`nng_listener_getopt_bool()`:: This function is for options which take a Boolean (`bool`). The value will be stored at _bvalp_. -==== `nng_listener_getopt_int()` +`nng_listener_getopt_int()`:: This function is for options which take an integer (`int`). The value will be stored at _ivalp_. -==== `nng_listener_getopt_ms()` +`nng_listener_getopt_ms()`:: This function is used to retrieve time <<nng_duration.5#,durations>> (such as timeouts), stored in _durp_ as a number of milliseconds. -==== `nng_listener_getopt_ptr()` +`nng_listener_getopt_ptr()`:: This function is used to retrieve a pointer, _ptr_, to structured data. The data referenced by _ptr_ is generally managed using other functions. Note that this form is somewhat special in that the object is generally not copied, but instead the *pointer* to the object is copied. -==== `nng_listener_getopt_size()` +`nng_listener_getopt_size()`:: This function is used to retrieve a size into the pointer _zp_, typically for buffer sizes, message maximum sizes, and similar options. -==== `nng_listener_getopt_sockaddr()` +`nng_listener_getopt_sockaddr()`:: This function is used to retrieve an `<<nng_sockaddr.5#,nng_sockaddr>>` into the value referenced by _sap_. -==== `nng_listener_getopt_string()` +`nng_listener_getopt_string()`:: This function is used to retrieve a string into _strp_. This string is created from the source using `<<nng_strdup.3#,nng_strdup()>>` and consequently must be freed by the caller using `<<nng_strfree.3#,nng_strfree()>>` when it is no longer needed. -==== `nng_listener_getopt_uint64()` +`nng_listener_getopt_uint64()`:: This function is used to retrieve a 64-bit unsigned value into the value referenced by _u64p_. This is typically used for options related to identifiers, network diff --git a/docs/man/nng_listener_setopt.3.adoc b/docs/man/nng_listener_setopt.3.adoc index c6f18ca8..d0968059 100644 --- a/docs/man/nng_listener_setopt.3.adoc +++ b/docs/man/nng_listener_setopt.3.adoc @@ -56,47 +56,48 @@ In all of these forms, the option _opt_ is configured on the listener _l_. 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. -TIP: Generally, it will be easier to use one of the typed forms instead. +TIP: It may be easier to use one of the typed forms of this function. -==== `nng_listener_setopt()` +`nng_listener_setopt()`:: 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_listener_setopt_bool()` +`nng_listener_setopt_bool()`:: This function is for options which take a Boolean (`bool`). The _bval_ is passed to the option. -==== `nng_listener_setopt_int()` +`nng_listener_setopt_int()`:: This function is for options which take an integer (`int`). The _ival_ is passed to the option. -==== `nng_listener_setopt_ms()` +`nng_listener_setopt_ms()`:: This function is used to configure time durations (such as timeouts) using type `<<nng_duration.5#,nng_duration>>`. The duration _dur_ is an integer number of milliseconds. -==== `nng_listener_setopt_ptr()` +`nng_listener_setopt_ptr()`:: This function is used to pass a pointer, _ptr_, to structured data. The data referenced by _ptr_ is generally managed by other functions. For example, TLS configuration objects created with (`<<nng_tls_config_alloc.3tls#,nng_tls_config_alloc()>>`) can be passed this way. -Note that this form is somewhat special in that the object is generally + +NOTE: This form is somewhat special in that the object is generally not copied, but instead the *pointer* to the object is copied. -==== `nng_listener_setopt_size()` +`nng_listener_setopt_size()`:: This function is used to configure a size, _z_, typically for buffer sizes, message maximum sizes, and similar options. -==== `nng_listener_setopt_string()` +`nng_listener_setopt_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_listener_setopt_uint64()` +`nng_listener_setopt_uint64()`:: This function is used to configure a 64-bit unsigned value, _u64_. This is typically used for options related to identifiers, network numbers, and similar. diff --git a/docs/man/nng_pipe_getopt.3.adoc b/docs/man/nng_pipe_getopt.3.adoc index 5fc3a1ce..9bc7529e 100644 --- a/docs/man/nng_pipe_getopt.3.adoc +++ b/docs/man/nng_pipe_getopt.3.adoc @@ -48,9 +48,8 @@ vary, and many are documented in <<nng_options.5#,nng_options(5)>>. Additionally some transport-specific options and protocol-specific options are documented with the transports and protocols themselves. -NOTE: All "`options`" on a pipe are read-only values, and intended to -facilitate understanding the identity of an associated peer. -Modification of options must be done on the listener or dialer using either +NOTE: All "`options`" on a pipe are read-only values. +Modification of options may be done before the pipe is created using `<<nng_listener_setopt.3#,nng_listener_setopt()>>` or `<<nng_dialer_getopt.3#,nng_dialer_setopt()>>`. @@ -64,67 +63,59 @@ In all of these forms, the option _opt_ is retrieved from the pipe _p_. 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_pipe_getopt()` - +`nng_pipe_getopt()`:: This is untyped, and can be used to retrieve the value of any option. 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_. - +buffer shall be stored at the location referenced by _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 -size returned in _valszp_ does not exceed the original buffer size. - +size returned 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: Generally, it will be easier to use one of the typed forms instead. - -==== `nng_pipe_getopt_bool()` +TIP: It may be easier to use one of the typed forms of this function. +`nng_pipe_getopt_bool()`:: This function is for options which take a Boolean (`bool`). The value will be stored at _bvalp_. -==== `nng_pipe_getopt_int()` - +`nng_pipe_getopt_int()`:: This function is for options which take an integer (`int`). The value will be stored at _ivalp_. -==== `nng_pipe_getopt_ms()` - +`nng_pipe_getopt_ms()`:: This function is used to retrieve time durations (`<<nng_duration.5#,nng_duration>>`) in milliseconds, which are stored in _durp_. -==== `nng_pipe_getopt_ptr()` +`nng_pipe_getopt_ptr()`:: This function is used to retrieve a pointer, _ptr_, to structured data. The data referenced by _ptr_ is generally managed using other functions. Note that this form is somewhat special in that the object is generally not copied, but instead the *pointer* to the object is copied. -==== `nng_pipe_getopt_size()` - +`nng_pipe_getopt_size()`:: This function is used to retrieve a size into the pointer _zp_, typically for buffer sizes, message maximum sizes, and similar options. -==== `nng_pipe_getopt_sockaddr()` - +`nng_pipe_getopt_sockaddr()`:: This function is used to retrieve an `<<nng_sockaddr.5#,nng_sockaddr>>` into _sap_. -==== `nng_pipe_getopt_string()` - +`nng_pipe_getopt_string()`:: This function is used to retrieve a string into _strp_. This string is created from the source using `<<nng_strdup.3#,nng_strdup()>>` and consequently must be freed by the caller using `<<nng_strfree.3#,nng_strfree()>>` when it is no longer needed. -==== `nng_pipe_getopt_uint64()` - +`nng_pipe_getopt_uint64()`:: This function is used to retrieve a 64-bit unsigned value into the value referenced by _u64p_. This is typically used for options diff --git a/docs/man/nng_setopt.3.adoc b/docs/man/nng_setopt.3.adoc index 7bb92271..966e3914 100644 --- a/docs/man/nng_setopt.3.adoc +++ b/docs/man/nng_setopt.3.adoc @@ -52,48 +52,48 @@ documented with the transports and protocols themselves. 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. -TIP: Generally, it will be easier to use one of the typed versions -of this function. - -==== `nng_setopt()` +`nng_setopt()`:: 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()` +TIP: It may be easier to use one of the typed forms of this function. + +`nng_setopt_bool()`:: This function is for options which take a Boolean (`bool`). The _bval_ is passed to the option. -==== `nng_setopt_int()` +`nng_setopt_int()`:: This function is for options which take an integer (`int`). The _ival_ is passed to the option. -==== `nng_setopt_ms()` +`nng_setopt_ms()`:: This function is used to configure time durations (such as timeouts) using type `<<nng_duration.5#,nng_duration>>`. The duration _dur_ is an integer number of milliseconds. -==== `nng_setopt_ptr()` +`nng_setopt_ptr()`:: This function is used to pass a pointer, _ptr_, to structured data. The data referenced by _ptr_ is generally managed by other functions. For example, TLS configuration objects created with (`<<nng_tls_config_alloc.3tls#,nng_tls_config_alloc()>>`) can be passed this way. -Note that this form is somewhat special in that the object is generally + +NOTE: This form is somewhat special in that the object is generally not copied, but instead the *pointer* to the object is copied. -==== `nng_setopt_size()` +`nng_setopt_size()`:: This function is used to configure a size, _z_, typically for buffer sizes, message maximum sizes, and similar options. -==== `nng_setopt_string()` +`nng_setopt_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_setopt_uint64()` +`nng_setopt_uint64()`:: This function is used to configure a 64-bit unsigned value, _u64_. This is typically used for options related to identifiers, network numbers, and similar. |
