aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2018-01-02 10:47:29 -0800
committerGarrett D'Amore <garrett@damore.org>2018-01-02 10:47:29 -0800
commit68f9a47cb836b72e69a69c60938c3728d3a94fe2 (patch)
treebe31d5e1e26b2e6739bd358826978a6e2c197f21
parent55088106fe2a6f26c7072cf114f44e5371d075eb (diff)
downloadnng-68f9a47cb836b72e69a69c60938c3728d3a94fe2.tar.gz
nng-68f9a47cb836b72e69a69c60938c3728d3a94fe2.tar.bz2
nng-68f9a47cb836b72e69a69c60938c3728d3a94fe2.zip
Websocket subprotocol not sent or checked.
-rw-r--r--src/transport/ws/websocket.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/transport/ws/websocket.c b/src/transport/ws/websocket.c
index 5a5a4b00..977119a2 100644
--- a/src/transport/ws/websocket.c
+++ b/src/transport/ws/websocket.c
@@ -743,6 +743,17 @@ ws_ep_init(void **epp, const char *url, nni_sock *sock, int mode)
return (rv);
}
+ if (mode == NNI_EP_MODE_DIAL) {
+ rv = nni_ws_dialer_proto(ep->dialer, ep->protoname);
+ } else {
+ rv = nni_ws_listener_proto(ep->listener, ep->protoname);
+ }
+
+ if (rv != 0) {
+ ws_ep_fini(ep);
+ return (rv);
+ }
+
*epp = ep;
return (0);
}