文件下:application/socketio/service/Server.php ``` 38 $io = new SocketIO($port); ``` 改成 ``` // 传入ssl选项,包含证书的路径 $context = [ 'ssl' => [ 'local_cert' => '/your/path/of/server.pem', 'local_pk' => '/your/path/of/server.key', 'verify_peer' => false, ] ]; $io = new SocketIO($port, $context); ``` 注意 local_cert 和 local_pk 文件的位置 重启就可以了