Added a WebSocket connection message handler.