From 4956ca62e353fe253e5db5dc0e77ba501f069158 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Mon, 1 Jun 2020 20:37:24 +0300 Subject: [PATCH] websocket: move .nonce_size to pub mut: --- vlib/net/websocket/examples/client.v | 1 + vlib/net/websocket/ws.v | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/vlib/net/websocket/examples/client.v b/vlib/net/websocket/examples/client.v index b787738de7..33f9d8d902 100644 --- a/vlib/net/websocket/examples/client.v +++ b/vlib/net/websocket/examples/client.v @@ -31,6 +31,7 @@ fn main() { } */ mut ws := websocket.new('ws://localhost:9001/getCaseCount') + // ws.nonce_size = 16 // try this, if it does not work with your server // defer { } ws.subscriber.subscribe('on_open', on_open) ws.subscriber.subscribe('on_message', on_message) diff --git a/vlib/net/websocket/ws.v b/vlib/net/websocket/ws.v index 1398e3c047..3a4fd05e9d 100644 --- a/vlib/net/websocket/ws.v +++ b/vlib/net/websocket/ws.v @@ -19,7 +19,6 @@ pub struct Client { // cwebsocket_subprotocol *subprotocol; // cwebsocket_subprotocol *subprotocols[]; mut: - nonce_size int = 18 // you can try 16 too lock &sync.Mutex = sync.new_mutex() write_lock &sync.Mutex = sync.new_mutex() state State @@ -31,6 +30,7 @@ mut: pub mut: uri string subscriber &eventbus.Subscriber + nonce_size int = 18 // you can try 16 too } struct Fragment {