conditional support for secure websocket connection
conditional support for secure websocket connection