Working example of WebSocket handler