Replace socket.io with websocket