-websocket is now opened and client connects, TODO: handshake
-some refractoring done