首页 thinkPHP 正文
  • 本文约271字,阅读需1分钟
  • 716
  • 0

tp5.1 Workerman 配置websocket支持wss

    protected $socket = 'websocket://0.0.0.0:2346'; //监听协议、地址、和端口
    protected $context = [
        'ssl' => [
            'local_cert'                 => 'D:\ssl\leakeyun.com.crt', // 绝对路径
            'local_pk'                   => 'D:\ssl\leakeyun.com.key',// 绝对路径
            'verify_peer' => false,
        ],
    ];
    protected $option = [
        'transport' => 'ssl',   //设置transport开启ssl,启用wss://
    ];

 

标签:PHPtp
评论
更换验证码