aboutsummaryrefslogtreecommitdiff
path: root/src/core/platform.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2020-07-26 16:45:11 -0700
committerGarrett D'Amore <garrett@damore.org>2020-07-27 19:15:08 -0700
commit09d667c49383edb980bcac88de1173c452066128 (patch)
treea9732fcf561032c1a10fcc3a3067404046bcc3b7 /src/core/platform.h
parent166981244eec7699190bf8b70c32ffe99e485b72 (diff)
downloadnng-09d667c49383edb980bcac88de1173c452066128.tar.gz
nng-09d667c49383edb980bcac88de1173c452066128.tar.bz2
nng-09d667c49383edb980bcac88de1173c452066128.zip
fixes #844 WebSocket wildcard host errors
fixes #1224 wss fails on IPV6 address This fixes bugs and inconsistencies in the way addresses are handled for HTTP (and consequently websocket). The Host: address line needs to look at numeric IPs and treat wildcards as if they are not specified, and needs to understand the IPv6 address format using brackets (e.g. [::1]:80).
Diffstat (limited to 'src/core/platform.h')
-rw-r--r--src/core/platform.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/platform.h b/src/core/platform.h
index 70420061..c6f4ef30 100644
--- a/src/core/platform.h
+++ b/src/core/platform.h
@@ -339,6 +339,12 @@ extern void nni_tcp_resolv(const char *, const char *, int, int, nni_aio *);
// service names using UDP.
extern void nni_udp_resolv(const char *, const char *, int, int, nni_aio *);
+// nni_parse_ip parses an IP address, without a port.
+extern int nni_parse_ip(const char *, nng_sockaddr *);
+
+// nni_parse_ip_port parses an IP address with an optional port appended.
+extern int nni_parse_ip_port(const char *, nng_sockaddr *);
+
//
// IPC (UNIX Domain Sockets & Named Pipes) Support.
//