Writing WebSocket client.