Add websocket connection handling.