swoole如何创建wss websocket服务?
网友回复
<?php $server = new Swoole\Websocket\Server("0.0.0.0", 9502, SWOOLE_PROCESS, SWOOLE_SOCK_TCP | SWOOLE_SSL); $server->set(array( 'worker_num' => 1, 'max_conn' => 65535, 'ssl_cert_file' => '/cert/domian.com.pem', 'ssl_key_file' => '/cert/domian.com.key', // ...
点击查看剩余70%