websocket: move .nonce_size to pub mut:

pull/5149/head
Delyan Angelov 2020-06-01 20:37:24 +03:00
parent 328a235f94
commit 4956ca62e3
2 changed files with 2 additions and 1 deletions

View File

@ -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)

View File

@ -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 {