diff --git a/docs/man/CMakeLists.txt b/docs/man/CMakeLists.txt index 1b6f94a55..75189a42f 100644 --- a/docs/man/CMakeLists.txt +++ b/docs/man/CMakeLists.txt @@ -97,10 +97,8 @@ if (NNG_ENABLE_DOC) nng_dialer_close nng_dialer_create nng_dialer_get - nng_dialer_getopt nng_dialer_id nng_dialer_set - nng_dialer_setopt nng_dialer_start nng_free nng_getopt diff --git a/docs/man/libnng.3.adoc b/docs/man/libnng.3.adoc index 383211038..8b81e8f7c 100644 --- a/docs/man/libnng.3.adoc +++ b/docs/man/libnng.3.adoc @@ -66,10 +66,8 @@ Listeners accept incoming connection requests, and dialers make them. |xref:nng_dialer_close.3.adoc[nng_dialer_close()]|close dialer |xref:nng_dialer_create.3.adoc[nng_dialer_create()]|create dialer |xref:nng_dialer_get.3.adoc[nng_dialer_get()]|get dialer option -|xref:nng_dialer_getopt.3.adoc[nng_dialer_getopt()]|get dialer option |xref:nng_dialer_id.3.adoc[nng_dialer_id()]|get numeric dialer identifier |xref:nng_dialer_set.3.adoc[nng_dialer_set()]|set dialer option -|xref:nng_dialer_setopt.3.adoc[nng_dialer_setopt()]|set dialer option |xref:nng_dialer_start.3.adoc[nng_dialer_start()]|start dialer |xref:nng_listen.3.adoc[nng_listen()]|create and start listener |xref:nng_listener_close.3.adoc[nng_listener_close()]|close listener diff --git a/docs/man/nng_dialer.5.adoc b/docs/man/nng_dialer.5.adoc index eb4d7c10d..d6b42a301 100644 --- a/docs/man/nng_dialer.5.adoc +++ b/docs/man/nng_dialer.5.adoc @@ -70,9 +70,9 @@ before it is opened, to prevent confusion with valid open dialers. xref:nng_dial.3.adoc[nng_dial(3)], xref:nng_dialer_close.3.adoc[nng_dialer_close(3)], xref:nng_dialer_create.3.adoc[nng_dialer_create(3)], -xref:nng_dialer_getopt.3.adoc[nng_dialer_getopt(3)], +xref:nng_dialer_get.3.adoc[nng_dialer_get(3)], xref:nng_dialer_id.3.adoc[nng_dialer_id(3)], -xref:nng_dialer_setopt.3.adoc[nng_dialer_setopt(3)], +xref:nng_dialer_set.3.adoc[nng_dialer_set(3)], xref:nng_dialer_start.3.adoc[nng_dialer_start(3)], xref:nng_listener.5.adoc[nng_listener(5)], xref:nng_pipe.5.adoc[nng_pipe(5)], diff --git a/docs/man/nng_dialer_create.3.adoc b/docs/man/nng_dialer_create.3.adoc index d4df92f45..aef9ff9cb 100644 --- a/docs/man/nng_dialer_create.3.adoc +++ b/docs/man/nng_dialer_create.3.adoc @@ -47,7 +47,7 @@ socket might have associated dialers, but might also have associated listeners. It may even have some of each at the same time! The dialer is not started, but may be further configured with -the xref:nng_dialer_setopt.3.adoc[`nng_dialer_setopt()`] family of functions. +the xref:nng_dialer_set.3.adoc[`nng_dialer_set()`] family of functions. Once it is fully configured, the dialer may be started using the xref:nng_dialer_start.3.adoc[`nng_dialer_start()`] function. @@ -71,8 +71,8 @@ This function returns 0 on success, and non-zero otherwise. [.text-left] xref:nng_dial.3.adoc[nng_dial(3)], xref:nng_dialer_close.3.adoc[nng_dialer_close(3)], -xref:nng_dialer_getopt.3.adoc[nng_dialer_getopt(3)], -xref:nng_dialer_setopt.3.adoc[nng_dialer_setopt(3)], +xref:nng_dialer_get.3.adoc[nng_dialer_get(3)], +xref:nng_dialer_set.3.adoc[nng_dialer_set(3)], xref:nng_dialer_start.3.adoc[nng_dialer_start(3)], xref:nng_listener_create.3.adoc[nng_listener_create(3)] xref:nng_strerror.3.adoc[nng_strerror(3)], diff --git a/docs/man/nng_dialer_getopt.3.adoc b/docs/man/nng_dialer_getopt.3.adoc deleted file mode 100644 index a40838193..000000000 --- a/docs/man/nng_dialer_getopt.3.adoc +++ /dev/null @@ -1,149 +0,0 @@ -= nng_dialer_getopt(3) -// -// Copyright 2020 Staysail Systems, Inc. -// Copyright 2018 Capitar IT Group BV -// -// 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_dialer_getopt - get dialer option - -== SYNOPSIS - -[source, c] ----- -#include - -int nng_dialer_getopt(nng_dialer d, const char *opt, void *val, size_t *valszp); - -int nng_dialer_getopt_bool(nng_dialer d, const char *opt, bool *bvalp); - -int nng_dialer_getopt_int(nng_dialer d, const char *opt, int *ivalp); - -int nng_dialer_getopt_ms(nng_dialer d, const char *opt, nng_duration *durp); - -int nng_dialer_getopt_ptr(nng_dialer d, const char *opt, void **ptr); - -int nng_dialer_getopt_size(nng_dialer d, const char *opt, size_t *zp); - -int nng_dialer_getopt_sockaddr(nng_dialer d, const char *opt, nng_sockaddr *sap); - -int nng_dialer_getopt_string(nng_dialer d, const char *opt, char **strp); - -int nng_dialer_getopt_uint64(nng_dialer d, const char *opt, uint64_t *u64p); - ----- - -== DESCRIPTION - -IMPORTANT: These functions are deprecated. Please see xref:nng_dialer_get.3.adoc[nng_dialer_get]. -They may not be present if the library was built with `NNG_ELIDE_DEPRECATED`. - -(((options, dialer))) -The `nng_dialer_getopt()` functions are used to retrieve option values for -the xref:nng_dialer.5.adoc[dialer] _d_. -The actual options that may be retrieved in this way -vary, and many are documented in xref:nng_options.5.adoc[nng_options(5)]. - -Additionally some transport-specific options are documented with the transports themselves. - -=== Forms - -In all of these forms, the option _opt_ is retrieved from the dialer _d_. -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_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_. + - + -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. + - + -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_dialer_getopt_bool()`:: -This function is for options which take a Boolean (`bool`). -The value will be stored at _bvalp_. - -`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()`:: -This function is used to retrieve time xref:nng_duration.5.adoc[durations] -(such as timeouts), stored in _durp_ as a number of milliseconds. -(The special value ((`NNG_DURATION_INFINITE`)) means an infinite amount of time, and -the special value ((`NNG_DURATION_DEFAULT`)) means a context-specific default.) - -`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()`:: -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()`:: -This function is used to retrieve an xref:nng_sockaddr.5.adoc[`nng_sockaddr`] -into the value referenced by _sap_. - -`nng_dialer_getopt_string()`:: -This function is used to retrieve a string into _strp_. -This string is created from the source using xref:nng_strdup.3.adoc[`nng_strdup()`] -and consequently must be freed by the caller using -xref:nng_strfree.3.adoc[`nng_strfree()`] when it is no longer needed. - -`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 -numbers, and similar. - -== RETURN VALUES - -These functions returns 0 on success, and non-zero otherwise. - -== ERRORS - -[horizontal] -`NNG_EBADTYPE`:: Incorrect type for option. -`NNG_ECLOSED`:: Parameter _d_ does not refer to an open dialer. -`NNG_EINVAL`:: Size of destination _val_ too small for object. -`NNG_ENOMEM`:: Insufficient memory exists. -`NNG_ENOTSUP`:: The option _opt_ is not supported. -`NNG_EWRITEONLY`:: The option _opt_ is write-only. - -== SEE ALSO - -[.text-left] -xref:nng_dialer_create.3.adoc[nng_dialer_create(3)] -xref:nng_dialer_setopt.3.adoc[nng_dialer_setopt(3)] -xref:nng_strdup.3.adoc[nng_strdup(3)], -xref:nng_strerror.3.adoc[nng_strerror(3)], -xref:nng_strfree.3.adoc[nng_strfree(3)], -xref:nng_dialer.5.adoc[nng_dialer(5)], -xref:nng_duration.5.adoc[nng_duration(5)], -xref:nng_options.5.adoc[nng_options(5)], -xref:nng_sockaddr.5.adoc[nng_sockaddr(5)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/man/nng_dialer_setopt.3.adoc b/docs/man/nng_dialer_setopt.3.adoc deleted file mode 100644 index 3aaff1eb1..000000000 --- a/docs/man/nng_dialer_setopt.3.adoc +++ /dev/null @@ -1,134 +0,0 @@ -= nng_dialer_setopt(3) -// -// Copyright 2020 Staysail Systems, Inc. -// Copyright 2018 Capitar IT Group BV -// -// 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_dialer_setopt - set dialer option - -== SYNOPSIS - -[source, c] ----- -#include - -int nng_dialer_setopt(nng_dialer d, const char *opt, const void *val, - size_t valsz); - -int nng_dialer_setopt_bool(nng_dialer d, const char *opt, bool bval); - -int nng_dialer_setopt_int(nng_dialer d, const char *opt, int ival); - -int nng_dialer_setopt_ms(nng_dialer d, const char *opt, nng_duration dur); - -int nng_dialer_setopt_ptr(nng_dialer d, const char *opt, void *ptr); - -int nng_dialer_setopt_size(nng_dialer d, const char *opt, size_t z); - -int nng_dialer_setopt_string(nng_dialer d, const char *opt, const char *str); - -int nng_dialer_setopt_uint64(nng_dialer d, const char *opt, uint64_t u64); - ----- - -== DESCRIPTION - -IMPORTANT: These functions are deprecated. Please see xref:nng_dialer_set.3.adoc[nng_dialer_set]. -They may not be present if the library was built with `NNG_ELIDE_DEPRECATED`. - -(((options, dialer))) -The `nng_dialer_setopt()` functions are used to configure options for -the xref:nng_dialer.5.adoc[dialer] _d_. -The actual options that may be configured in this way -vary, and many are documented in xref:nng_options.5.adoc[nng_options(5)]. - -Additionally some transport-specific options are documented with the -transports themselves. - -NOTE: Once a dialer has started, it is generally not possible to change -its configuration. - -=== Forms - -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. - -`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_. - -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()`:: -This function is for options which take an integer (`int`). -The _ival_ is passed to the option. - -`nng_dialer_setopt_ms()`:: -This function is used to configure time durations (such as timeouts) using -type xref:nng_duration.5.adoc[`nng_duration`]. -The duration _dur_ is an integer number of milliseconds. - -`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 -(xref:nng_tls_config_alloc.3tls.adoc[`nng_tls_config_alloc()`]) -can be passed this way. - -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()`:: -This function is used to configure a size, _z_, typically for buffer sizes, -message maximum sizes, and similar options. - -`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()`:: -This function is used to configure a 64-bit unsigned value, _u64_. -This is typically used for options related to identifiers, network numbers, -and such. - -== RETURN VALUES - -These functions return 0 on success, and non-zero otherwise. - -== ERRORS - -[horizontal] -`NNG_EBADTYPE`:: Incorrect type for option. -`NNG_ECLOSED`:: Parameter _d_ does not refer to an open dialer. -`NNG_EINVAL`:: The value being passed is invalid. -`NNG_ENOTSUP`:: The option _opt_ is not supported. -`NNG_EREADONLY`:: The option _opt_ is read-only. -`NNG_ESTATE`:: The dialer _d_ is already started. - -== SEE ALSO - -[.text-left] -xref:nng_dialer_create.3.adoc[nng_dialer_create(3)] -xref:nng_dialer_getopt.3.adoc[nng_dialer_getopt(3)] -xref:nng_strerror.3.adoc[nng_strerror(3)], -xref:nng_dialer.5.adoc[nng_dialer(5)], -xref:nng_duration.5.adoc[nng_duration(5)], -xref:nng_options.5.adoc[nng_options(5)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/man/nng_getopt.3.adoc b/docs/man/nng_getopt.3.adoc index b4f117cfc..4a648ae2b 100644 --- a/docs/man/nng_getopt.3.adoc +++ b/docs/man/nng_getopt.3.adoc @@ -132,7 +132,6 @@ These functions return 0 on success, and non-zero otherwise. == SEE ALSO [.text-left] -xref:nng_dialer_getopt.3.adoc[nng_dialer_getopt(3)], xref:nng_listener_getopt.3.adoc[nng_listener_getopt(3)], xref:nng_setopt.3.adoc[nng_setopt(3)], xref:nng_strdup.3.adoc[nng_strdup(3)], diff --git a/docs/man/nng_pipe_get.3.adoc b/docs/man/nng_pipe_get.3.adoc deleted file mode 100644 index 51a8debfd..000000000 --- a/docs/man/nng_pipe_get.3.adoc +++ /dev/null @@ -1,153 +0,0 @@ -= nng_pipe_get(3) -// -// Copyright 2019 Staysail Systems, Inc. -// Copyright 2018 Capitar IT Group BV -// -// 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_pipe_get - get pipe option - -== SYNOPSIS - -[source, c] ----- -#include - -int nng_pipe_get(nng_pipe p, const char *opt, void *val, size_t *valszp); - -int nng_pipe_get_bool(nng_pipe p, const char *opt, bool *bvalp); - -int nng_pipe_get_int(nng_pipe p, const char *opt, int *ivalp); - -int nng_pipe_get_ms(nng_pipe p, const char *opt, nng_duration *durp); - -int nng_pipe_get_ptr(nng_pipe p, const char *opt, void **ptr); - -int nng_pipe_get_addr(nng_pipe p, const char *opt, nng_sockaddr *sap); - -int nng_pipe_get_string(nng_pipe p, const char *opt, char **strp); - -int nng_pipe_get_size(nng_pipe p, const char *opt, size_t *zp); - -int nng_pipe_get_uint64(nng_pipe p, const char *opt, uint64_t *u64p); - ----- - -== DESCRIPTION - -(((options, pipe))) -The `nng_pipe_get()` functions are used to retrieve option values for -the xref:nng_pipe.5.adoc[pipe] _p_. -The actual options that may be retrieved in this way -vary, and many are documented in xref:nng_options.5.adoc[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. -Modification of options may be done before the pipe is created using -xref:nng_listener_set.3.adoc[`nng_listener_set()`] or -xref:nng_dialer_get.3.adoc[`nng_dialer_set()`]. - -Any option that is set on a dialer or listener will normally be retrievable -from pipes created by that dialer or listener. - -=== Forms - -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_get()`:: -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_. + - + -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. + - + -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_pipe_get_bool()`:: -This function is for options which take a Boolean (`bool`). -The value will be stored at _bvalp_. - -`nng_pipe_get_int()`:: -This function is for options which take an integer (`int`). -The value will be stored at _ivalp_. - -`nng_pipe_get_ms()`:: -This function is used to retrieve time durations -(xref:nng_duration.5.adoc[`nng_duration`]) in milliseconds, which are stored in -_durp_. - -`nng_pipe_get_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_get_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_get_addr()`:: -This function is used to retrieve an xref:nng_sockaddr.5.adoc[`nng_sockaddr`] -into _sap_. - -`nng_pipe_get_string()`:: -This function is used to retrieve a string into _strp_. -This string is created from the source using xref:nng_strdup.3.adoc[`nng_strdup()`] -and consequently must be freed by the caller using -xref:nng_strfree.3.adoc[`nng_strfree()`] when it is no longer needed. - -`nng_pipe_get_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 numbers, and similar. - -== RETURN VALUES - -These functions return 0 on success, and non-zero otherwise. - -== ERRORS - -[horizontal] -`NNG_EBADTYPE`:: Incorrect type for option. -`NNG_ECLOSED`:: Parameter _p_ does not refer to an open pipe. -`NNG_ENOTSUP`:: The option _opt_ is not supported. -`NNG_ENOMEM`:: Insufficient memory exists. -`NNG_EINVAL`:: Size of destination _val_ too small for object. -`NNG_EWRITEONLY`:: The option _opt_ is write-only. - -== SEE ALSO - -[.text-left] -xref:nng_dialer_set.3.adoc[nng_dialer_set(3)] -xref:nng_socket_get.3.adoc[nng_socket_get(3)], -xref:nng_listener_set.3.adoc[nng_listener_set(3)] -xref:nng_msg_get_pipe.3.adoc[nng_msg_get_pipe(3)] -xref:nng_strdup.3.adoc[nng_strdup(3)], -xref:nng_strerror.3.adoc[nng_strerror(3)], -xref:nng_strfree.3.adoc[nng_strfree(3)], -xref:nng_duration.5.adoc[nng_duration(5)], -xref:nng_options.5.adoc[nng_options(5)], -xref:nng_pipe.5.adoc[nng_pipe(5)], -xref:nng_sockaddr.5.adoc[nng_sockaddr(5)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/man/nng_setopt.3.adoc b/docs/man/nng_setopt.3.adoc index 6c21cf956..61926d69d 100644 --- a/docs/man/nng_setopt.3.adoc +++ b/docs/man/nng_setopt.3.adoc @@ -119,7 +119,6 @@ These functions return 0 on success, and non-zero otherwise. [.text-left] xref:nng_getopt.3.adoc[nng_getopt(3)], -xref:nng_dialer_setopt.3.adoc[nng_dialer_setopt(3)], xref:nng_listener_setopt.3.adoc[nng_listener_setopt(3)], xref:nng_strerror.3.adoc[nng_strerror(3)], xref:nng_options.5.adoc[nng_options(5)], diff --git a/include/nng/nng.h b/include/nng/nng.h index 8a4fd7f24..a2a3efb40 100644 --- a/include/nng/nng.h +++ b/include/nng/nng.h @@ -1348,42 +1348,6 @@ NNG_DECL int nng_ctx_setopt_ms( nng_ctx, const char *, nng_duration) NNG_DEPRECATED; NNG_DECL int nng_ctx_setopt_size(nng_ctx, const char *, size_t) NNG_DEPRECATED; -// Dialer options. Use nng_dialer_get and nng_dialer_set instead. -NNG_DECL int nng_dialer_getopt( - nng_dialer, const char *, void *, size_t *) NNG_DEPRECATED; -NNG_DECL int nng_dialer_getopt_bool( - nng_dialer, const char *, bool *) NNG_DEPRECATED; -NNG_DECL int nng_dialer_getopt_int( - nng_dialer, const char *, int *) NNG_DEPRECATED; -NNG_DECL int nng_dialer_getopt_ms( - nng_dialer, const char *, nng_duration *) NNG_DEPRECATED; -NNG_DECL int nng_dialer_getopt_size( - nng_dialer, const char *, size_t *) NNG_DEPRECATED; -NNG_DECL int nng_dialer_getopt_sockaddr( - nng_dialer, const char *, nng_sockaddr *) NNG_DEPRECATED; -NNG_DECL int nng_dialer_getopt_uint64( - nng_dialer, const char *, uint64_t *) NNG_DEPRECATED; -NNG_DECL int nng_dialer_getopt_ptr( - nng_dialer, const char *, void **) NNG_DEPRECATED; -NNG_DECL int nng_dialer_getopt_string( - nng_dialer, const char *, char **) NNG_DEPRECATED; -NNG_DECL int nng_dialer_setopt( - nng_dialer, const char *, const void *, size_t) NNG_DEPRECATED; -NNG_DECL int nng_dialer_setopt_bool( - nng_dialer, const char *, bool) NNG_DEPRECATED; -NNG_DECL int nng_dialer_setopt_int( - nng_dialer, const char *, int) NNG_DEPRECATED; -NNG_DECL int nng_dialer_setopt_ms( - nng_dialer, const char *, nng_duration) NNG_DEPRECATED; -NNG_DECL int nng_dialer_setopt_size( - nng_dialer, const char *, size_t) NNG_DEPRECATED; -NNG_DECL int nng_dialer_setopt_uint64( - nng_dialer, const char *, uint64_t) NNG_DEPRECATED; -NNG_DECL int nng_dialer_setopt_ptr( - nng_dialer, const char *, void *) NNG_DEPRECATED; -NNG_DECL int nng_dialer_setopt_string( - nng_dialer, const char *, const char *) NNG_DEPRECATED; - // Listener options. Use nng_listener_get and nng_listener_set instead. NNG_DECL int nng_listener_getopt( nng_listener, const char *, void *, size_t *) NNG_DEPRECATED; diff --git a/src/nng_legacy.c b/src/nng_legacy.c index 9203743ee..a8e2bf136 100644 --- a/src/nng_legacy.c +++ b/src/nng_legacy.c @@ -185,110 +185,6 @@ nng_ctx_setopt_size(nng_ctx id, const char *n, size_t v) return (nng_ctx_set_size(id, n, v)); } -// Dialers. - -int -nng_dialer_getopt(nng_dialer id, const char *n, void *v, size_t *sz) -{ - return (nng_dialer_get(id, n, v, sz)); -} - -int -nng_dialer_getopt_int(nng_dialer id, const char *n, int *v) -{ - return (nng_dialer_get_int(id, n, v)); -} - -int -nng_dialer_getopt_bool(nng_dialer id, const char *n, bool *v) -{ - return (nng_dialer_get_bool(id, n, v)); -} - -int -nng_dialer_getopt_size(nng_dialer id, const char *n, size_t *v) -{ - return (nng_dialer_get_size(id, n, v)); -} - -int -nng_dialer_getopt_uint64(nng_dialer id, const char *n, uint64_t *v) -{ - return (nng_dialer_get_uint64(id, n, v)); -} - -int -nng_dialer_getopt_string(nng_dialer id, const char *n, char **v) -{ - return (nng_dialer_get_string(id, n, v)); -} - -int -nng_dialer_getopt_ptr(nng_dialer id, const char *n, void **v) -{ - return (nng_dialer_get_ptr(id, n, v)); -} - -int -nng_dialer_getopt_ms(nng_dialer id, const char *n, nng_duration *v) -{ - return (nng_dialer_get_ms(id, n, v)); -} - -int -nng_dialer_getopt_sockaddr(nng_dialer id, const char *n, nng_sockaddr *v) -{ - return (nng_dialer_get_addr(id, n, v)); -} - -int -nng_dialer_setopt(nng_dialer id, const char *name, const void *v, size_t sz) -{ - return (nng_dialer_set(id, name, v, sz)); -} - -int -nng_dialer_setopt_bool(nng_dialer id, const char *n, bool v) -{ - return (nng_dialer_set_bool(id, n, v)); -} - -int -nng_dialer_setopt_int(nng_dialer id, const char *n, int v) -{ - return (nng_dialer_set_int(id, n, v)); -} - -int -nng_dialer_setopt_ms(nng_dialer id, const char *n, nng_duration v) -{ - return (nng_dialer_set_ms(id, n, v)); -} - -int -nng_dialer_setopt_size(nng_dialer id, const char *n, size_t v) -{ - return (nng_dialer_set_size(id, n, v)); -} - -int -nng_dialer_setopt_uint64(nng_dialer id, const char *n, uint64_t v) -{ - return (nng_dialer_set_uint64(id, n, v)); -} - -int -nng_dialer_setopt_ptr(nng_dialer id, const char *n, void *v) -{ - return (nng_dialer_set_ptr(id, n, v)); -} - -int -nng_dialer_setopt_string(nng_dialer id, const char *n, const char *v) -{ - return (nng_dialer_set_string(id, n, v)); -} - // Listeners. int