As I understand at the beginning you need to send a handshake through http and switch protocols to websocket, and then you use a socket connection to send/receive data?
On the other hand sending http request also uses sockets (at least the one I have uses winsock).
So, how it all works - do you keep the handshake socket connection open after the handshake and reuse it or do you open another socket afterwards?