implement WebSocket support