webman使用wss作为客户端报错(已解决)

清梦独行

问题描述

webman使用wss作为客户端报错Exception: class \Protocols\Wss not exist

程序代码

<?php

namespace process;

use Workerman\Connection\AsyncTcpConnection;

class MarketProcess
{
    public function onWorkerStart($worker)
    {
        $conn = new AsyncTcpConnection('wss://api-aws.huobi.pro/ws');
        $conn->onConnect = function (AsyncTcpConnection $conn) {
            dump($conn);
        };

        $conn->onMessage = function (AsyncTcpConnection $conn, $data) {
            dump(gzdecode($data));
        };
        $conn->connect();

    }
}

报错信息

Exception: class \Protocols\Wss not exist in /Users/tomjson/Code/exchange-server/vendor/workerman/workerman/Connection/AsyncTcpConnection.php:156
Stack trace:

截图报错信息里报错文件相关代码

截图

操作系统及workerman/webman等框架组件具体版本

mac os

1501 2 0
2个回答

清梦独行

已经解决了

不败少龙

你还是在问题前面 标注已解决

  • 暂无评论
年代过于久远,无法发表回答
×
🔝