-
-
Notifications
You must be signed in to change notification settings - Fork 499
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
8 changed files
with
62 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
= nng_listener_get(3) | ||
// | ||
// Copyright 2020 Staysail Systems, Inc. <[email protected]> | ||
// Copyright 2025 Staysail Systems, Inc. <[email protected]> | ||
// Copyright 2018 Capitar IT Group BV <[email protected]> | ||
// | ||
// 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. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// | ||
// Copyright 2021 Staysail Systems, Inc. <[email protected]> | ||
// Copyright 2025 Staysail Systems, Inc. <[email protected]> | ||
// Copyright 2018 Capitar IT Group BV <[email protected]> | ||
// Copyright 2018 Devolutions <[email protected]> | ||
// | ||
|
@@ -25,6 +25,7 @@ extern int nni_dialer_setopt( | |
nni_dialer *, const char *, const void *, size_t, nni_type); | ||
extern int nni_dialer_getopt( | ||
nni_dialer *, const char *, void *, size_t *, nni_type); | ||
extern const nng_url *nni_dialer_url(nni_dialer *); | ||
extern void nni_dialer_add_stat(nni_dialer *, nni_stat_item *); | ||
extern void nni_dialer_bump_error(nni_dialer *, int); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
// | ||
// Copyright 2021 Staysail Systems, Inc. <[email protected]> | ||
// Copyright 2025 Staysail Systems, Inc. <[email protected]> | ||
// Copyright 2018 Capitar IT Group BV <[email protected]> | ||
// Copyright 2018 Devolutions <[email protected]> | ||
// | ||
|
@@ -25,6 +25,7 @@ extern int nni_listener_setopt( | |
nni_listener *, const char *, const void *, size_t, nni_type); | ||
extern int nni_listener_getopt( | ||
nni_listener *, const char *, void *, size_t *, nni_type); | ||
extern const nng_url *nni_listener_url(nni_listener *); | ||
extern void nni_listener_add_stat(nni_listener *, nni_stat_item *); | ||
extern void nni_listener_bump_error(nni_listener *, int); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters