按照示例的代码尝试链接WSS报错
$con = new AsyncTcpConnection('wss://ws.yuming.com:2888');
// 设置以ssl加密方式访问,使之成为wss
$con->transport = 'ssl';
$con->onConnect = function(AsyncTcpConnection $con) {
$con->send('hello');
};
$con->onMessage = function(AsyncTcpConnection $con, $data) {
echo $data;
};
$con->connect();
Exception: class \Protocols\Wss not exist in /demo/server/vendor/workerman/workerman/Connection/AsyncTcpConnection.php:155
Stack trace:
Workerman version:4.0.27
PHP version:7.2.33
ws://ws.yuming.com:2888
$con->transport = 'ssl';
谢谢