diff options
| author | Garrett D'Amore <garrett@damore.org> | 2025-01-04 18:22:27 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2025-01-04 18:22:27 -0800 |
| commit | 561fc87c4ae15d2349d9169fbd340d649a364ebd (patch) | |
| tree | 139296a35483f1caaa147d1a7e1d8e8b95c64b1d /docs/man | |
| parent | 0260bd8f717a430e5327af4cce8f9431710ab233 (diff) | |
| download | nng-561fc87c4ae15d2349d9169fbd340d649a364ebd.tar.gz nng-561fc87c4ae15d2349d9169fbd340d649a364ebd.tar.bz2 nng-561fc87c4ae15d2349d9169fbd340d649a364ebd.zip | |
api: introduce NNG 2.0 compatible nng_dialer_get_url and nng_listener_get_url
This is meant to help applications start adopting new interfaces before converting to NNG 2.0
Diffstat (limited to 'docs/man')
| -rw-r--r-- | docs/man/nng_dialer_get.3.adoc | 5 | ||||
| -rw-r--r-- | docs/man/nng_listener_get.3.adoc | 11 |
2 files changed, 15 insertions, 1 deletions
diff --git a/docs/man/nng_dialer_get.3.adoc b/docs/man/nng_dialer_get.3.adoc index 5084c1b3..6750a535 100644 --- a/docs/man/nng_dialer_get.3.adoc +++ b/docs/man/nng_dialer_get.3.adoc @@ -37,6 +37,8 @@ int nng_dialer_get_string(nng_dialer d, const char *opt, char **strp); int nng_dialer_get_uint64(nng_dialer d, const char *opt, uint64_t *u64p); +int nng_dialer_get_url(nng_dialer d, const nng_url **url); + ---- == DESCRIPTION @@ -117,6 +119,9 @@ referenced by _u64p_. This is typically used for options related to identifiers, network numbers, and similar. +`nng_dialer_get_url()`:: +This function is used to obtain the URL that dialer is configured for. + == RETURN VALUES These functions returns 0 on success, and non-zero otherwise. diff --git a/docs/man/nng_listener_get.3.adoc b/docs/man/nng_listener_get.3.adoc index 83ae6986..3be8cfd9 100644 --- a/docs/man/nng_listener_get.3.adoc +++ b/docs/man/nng_listener_get.3.adoc @@ -1,6 +1,6 @@ = nng_listener_get(3) // -// Copyright 2020 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2025 Staysail Systems, Inc. <info@staysail.tech> // Copyright 2018 Capitar IT Group BV <info@capitar.com> // // This document is supplied under the terms of the MIT License, a @@ -37,6 +37,8 @@ int nng_listener_get_string(nng_listener l, const char *opt, char **strp); int nng_listener_get_uint64(nng_listener l, const char *opt, uint64_t *u64p); +int nng_listener_get_url(nng_listener l, const nng_url **url); + ---- == DESCRIPTION @@ -115,6 +117,13 @@ referenced by _u64p_. This is typically used for options related to identifiers, network numbers, and similar. +`nng_listener_get_url()`:: +This function is used to obtain the URL that listener is configured for. +This is the actual URL, and may different that what was requested. +For example, when using TCP, if port 0 was requested, but then the listener +was started, a real port will have been chosen by the operating system. +This URL will reflect that final port, so it can be used for dialing. + == RETURN VALUES These functions return 0 on success, and non-zero otherwise. |
