I was using older version of handshake(with two keys) and everything was fine. Now I’m creating Sec-WebSocket-Accept key, and manage to connect to the server. But as soon as I send message to connected client, it get disconnected.
I guess those lines of code are wrong, but I can not find working example of sending data(examples are mainly for older WS version)
ConnectionSocket.Send(New Byte() {CByte(WrapperBytes.Start)}, 1, 0)
ConnectionSocket.Send(Encoding.UTF8.GetBytes(str))
ConnectionSocket.Send(New Byte() {CByte(WrapperBytes.[End])}, 1, 0)
See the latest draft of the spec for how to send/receive data now.
It’d also be worth checking which version of web sockets is supported by your browser.
In case it helps, I’ve written a C++ example. The WsProtocol80 class shows how to read/write data.