optionally define the websocket object