From be13c2e8845423cec17af429fc4e16a5d9749e47 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 26 Oct 2025 10:54:58 -0700 Subject: Replace nng_pipe_get_addr, nng_stream_get_addr, and the NNG_OPT_REMADDR option. More direct access methods are provided instead. This results in much lower friction when using, and is a step on the path to removing NNG_OPT_LOCADDR as well. We need to figure a solution for NNG_OPT_LOCADDR for dialers; for listeners there is little use in it either, and it will be removed. (Dialers will probably get a new NNG_OPT_BIND_IP option.) --- src/core/url.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/url.c') diff --git a/src/core/url.c b/src/core/url.c index b6323ba0..30962769 100644 --- a/src/core/url.c +++ b/src/core/url.c @@ -571,7 +571,7 @@ nng_url_sprintf(char *str, size_t size, const nng_url *url) return (snprintf(str, size, "%s://%s", scheme, url->u_path)); } - if (url->u_port == nni_url_default_port(scheme)) { + if (url->u_port != 0 && url->u_port == nni_url_default_port(scheme)) { do_port = false; } if (strchr(host, ':') != 0) { -- cgit v1.2.3-70-g09d2