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://
    ];

 


JS判断当前是http还是https

6月2日,星期五,在这里每天60秒读懂世界!

评 论
更换验证码