\GatewayWorker\BusinessWorker;
use \Workerman\Autoloader;
// 证书最好是申请的证书
$context = array(
// 更多ssl' => '/etc/ssl/certs/1_bundle.crt', // 也可以是crt文件
'local_pk'=> '/etc/ssl/certs/2_.key',
'verify_peer' => false,
// 'allow_self_signedwebsocket协议(端口任意,只要没有被其它程序占用就行)
$gateway = new Gateway("websocket://0.0.0.0:6686", $context);
// 开启SSL,websocket+SSL 即wss
$gateway->transport = 'ssl';
// gateway名称,status方便查看
$gateway->name = 'WebsocketSSL