WebSocket client optimize