websocket function deduces secure or not