Set WebSocket handler