我正在尝试使用以下代码连接 websocket 服务器。但没有连接。这是我在 BeanShell PostProcessor 中使用的代码
// Create a new WebSocket.
var socket = new WebSocket('wss://api.qa.xyz.io:443');
// Show a connected message when the WebSocket is opened.
socket.onopen = function(event) {
socketStatus.innerHTML = 'Connected to: ' + event.currentTarget.url;
socketStatus.className = 'open';
};