aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/url.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/url.c b/src/core/url.c
index 530e299c..1b39f809 100644
--- a/src/core/url.c
+++ b/src/core/url.c
@@ -719,6 +719,14 @@ nng_url_port(const nng_url *url)
return (url->u_port);
}
+void
+nng_url_resolve_port(nng_url *url, uint32_t port)
+{
+ if (url->u_port == 0) {
+ url->u_port = port;
+ }
+}
+
const char *
nng_url_hostname(const nng_url *url)
{