Commit 2a90af7a authored by 冯超鹏's avatar 冯超鹏

wss bug

parent fafdb34b
Pipeline #156 canceled with stages
...@@ -57,18 +57,18 @@ class alarm extends Command ...@@ -57,18 +57,18 @@ class alarm extends Command
{ {
$url = config('public.swoolwebsocketurl'); $url = config('public.swoolwebsocketurl');
$por = config('public.swoolwebsocketurlpor'); $por = config('public.swoolwebsocketurlpor');
$this->ws = new \swoole_websocket_server('0.0.0.0', 9601,SWOOLE_SOCK_TCP | SWOOLE_SSL); //创建一个端口 $this->ws = new \swoole_websocket_server('0.0.0.0', 9601,SWOOLE_PROCESS,SWOOLE_SOCK_TCP | SWOOLE_SSL); //创建一个端口
$this->ws->set(array( $this->ws->set(array(
'reactor_num' => 2, //reactor线程数 'reactor_num' => 2, //reactor线程数
'worker_num' => 4, //worker进程数 'worker_num' => 4, //worker进程数
'backlog' => 128, //Listen队列长度 'backlog' => 128, //Listen队列长度
'max_request' => 10,//最大连接 'max_request' => 10,//最大连接
'daemonize'=>0,//守护进程 'daemonize'=>0,//守护进程
'ssl_cert_file' => base_path() . '/tests/textcert/4544322_iot.zhkjgf.com_chain', 'ssl_cert_file' => base_path() . '/tests/textcert/4544322_iot.zhkjgf.com_public.crt',
'ssl_key_file' => base_path() . '/tests/textcert/4544322_iot.zhkjgf.com.key', 'ssl_key_file' => base_path() . '/tests/textcert/4544322_iot.zhkjgf.com.key',
'ssl_verify_peer' => true, 'ssl_verify_peer' => true,
'ssl_allow_self_signed' => true, 'ssl_allow_self_signed' => true,
'ssl_client_cert_file' => base_path() . '/tests/textcert/4544322_iot.zhkjgf.com_public.crt', 'ssl_client_cert_file' => base_path() . '/tests/textcert/4544322_iot.zhkjgf.com_chain',
)); ));
$this->ws->on('open', function ($ws, $request) { $this->ws->on('open', function ($ws, $request) {
// //链接成功 // //链接成功
......
...@@ -57,18 +57,18 @@ class chemicalswb extends Command ...@@ -57,18 +57,18 @@ class chemicalswb extends Command
{ {
$url = config('public.swoolwebsocketurl'); $url = config('public.swoolwebsocketurl');
$por = config('public.swoolwebsocketurlpor'); $por = config('public.swoolwebsocketurlpor');
$this->ws = new \swoole_websocket_server('0.0.0.0', 9507,SWOOLE_SOCK_TCP | SWOOLE_SSL); //创建一个端口 $this->ws = new \swoole_websocket_server('0.0.0.0', 9507,SWOOLE_PROCESS,SWOOLE_SOCK_TCP | SWOOLE_SSL); //创建一个端口
$this->ws->set(array( $this->ws->set(array(
'reactor_num' => 2, //reactor线程数 'reactor_num' => 2, //reactor线程数
'worker_num' => 4, //worker进程数 'worker_num' => 4, //worker进程数
'backlog' => 128, //Listen队列长度 'backlog' => 128, //Listen队列长度
'max_request' => 10,//最大连接 'max_request' => 10,//最大连接
'daemonize'=>0,//守护进程 'daemonize'=>0,//守护进程
'ssl_cert_file' => base_path() . '/tests/textcert/4544322_iot.zhkjgf.com_chain', 'ssl_cert_file' => base_path() . '/tests/textcert/4544322_iot.zhkjgf.com_public.crt',
'ssl_key_file' => base_path() . '/tests/textcert/4544322_iot.zhkjgf.com.key', 'ssl_key_file' => base_path() . '/tests/textcert/4544322_iot.zhkjgf.com.key',
'ssl_verify_peer' => true, 'ssl_verify_peer' => true,
'ssl_allow_self_signed' => true, 'ssl_allow_self_signed' => true,
'ssl_client_cert_file' => base_path() . '/tests/textcert/4544322_iot.zhkjgf.com_public.crt', 'ssl_client_cert_file' => base_path() . '/tests/textcert/4544322_iot.zhkjgf.com_chain',
)); ));
$this->ws->on('open', function ($ws, $request) { $this->ws->on('open', function ($ws, $request) {
// //链接成功 // //链接成功
......
...@@ -57,18 +57,18 @@ class firewb extends Command ...@@ -57,18 +57,18 @@ class firewb extends Command
{ {
$url = config('public.swoolwebsocketurl'); $url = config('public.swoolwebsocketurl');
$por = config('public.swoolwebsocketurlpor'); $por = config('public.swoolwebsocketurlpor');
$this->ws = new \swoole_websocket_server('0.0.0.0', 9508,SWOOLE_SOCK_TCP | SWOOLE_SSL); //创建一个端口 $this->ws = new \swoole_websocket_server('0.0.0.0', 9508,SWOOLE_PROCESS,SWOOLE_SOCK_TCP | SWOOLE_SSL); //创建一个端口
$this->ws->set(array( $this->ws->set(array(
'reactor_num' => 2, //reactor线程数 'reactor_num' => 2, //reactor线程数
'worker_num' => 4, //worker进程数 'worker_num' => 4, //worker进程数
'backlog' => 128, //Listen队列长度 'backlog' => 128, //Listen队列长度
'max_request' => 10,//最大连接 'max_request' => 10,//最大连接
'daemonize'=>0,//守护进程 'daemonize'=>0,//守护进程
'ssl_cert_file' => base_path() . '/tests/textcert/4544322_iot.zhkjgf.com_chain', 'ssl_cert_file' => base_path() . '/tests/textcert/4544322_iot.zhkjgf.com_public.crt',
'ssl_key_file' => base_path() . '/tests/textcert/4544322_iot.zhkjgf.com.key', 'ssl_key_file' => base_path() . '/tests/textcert/4544322_iot.zhkjgf.com.key',
'ssl_verify_peer' => true, 'ssl_verify_peer' => true,
'ssl_allow_self_signed' => true, 'ssl_allow_self_signed' => true,
'ssl_client_cert_file' => base_path() . '/tests/textcert/4544322_iot.zhkjgf.com_public.crt', 'ssl_client_cert_file' => base_path() . '/tests/textcert/4544322_iot.zhkjgf.com_chain',
)); ));
$this->ws->on('open', function ($ws, $request) { $this->ws->on('open', function ($ws, $request) {
// //链接成功 // //链接成功
......
...@@ -57,18 +57,18 @@ class swoole extends Command ...@@ -57,18 +57,18 @@ class swoole extends Command
{ {
$url = config('public.swoolwebsocketurl'); $url = config('public.swoolwebsocketurl');
$por = config('public.swoolwebsocketurlpor'); $por = config('public.swoolwebsocketurlpor');
$this->ws = new \swoole_websocket_server('0.0.0.0', 9502,SWOOLE_SOCK_TCP | SWOOLE_SSL); //创建一个端口 $this->ws = new \swoole_websocket_server('0.0.0.0', 9502,SWOOLE_PROCESS,SWOOLE_SOCK_TCP | SWOOLE_SSL); //创建一个端口
$this->ws->set(array( $this->ws->set(array(
'reactor_num' => 2, //reactor线程数 'reactor_num' => 2, //reactor线程数
'worker_num' => 4, //worker进程数 'worker_num' => 4, //worker进程数
'backlog' => 128, //Listen队列长度 'backlog' => 128, //Listen队列长度
'max_request' => 10,//最大连接 'max_request' => 10,//最大连接
'daemonize'=>0,//守护进程 'daemonize'=>0,//守护进程
'ssl_cert_file' => base_path() . '/tests/textcert/4544322_iot.zhkjgf.com_chain', 'ssl_cert_file' => base_path() . '/tests/textcert/4544322_iot.zhkjgf.com_public.crt',
'ssl_key_file' => base_path() . '/tests/textcert/4544322_iot.zhkjgf.com.key', 'ssl_key_file' => base_path() . '/tests/textcert/4544322_iot.zhkjgf.com.key',
'ssl_verify_peer' => true, 'ssl_verify_peer' => true,
'ssl_allow_self_signed' => true, 'ssl_allow_self_signed' => true,
'ssl_client_cert_file' => base_path() . '/tests/textcert/4544322_iot.zhkjgf.com_public.crt', 'ssl_client_cert_file' => base_path() . '/tests/textcert/4544322_iot.zhkjgf.com_chain',
)); ));
$this->ws->on('open', function ($ws, $request) { $this->ws->on('open', function ($ws, $request) {
// //链接成功 // //链接成功
......
...@@ -67,11 +67,11 @@ class swooleMeTcp extends Command ...@@ -67,11 +67,11 @@ class swooleMeTcp extends Command
'backlog' => 128, 'backlog' => 128,
'heartbeat_check_interval' => 30, 'heartbeat_check_interval' => 30,
'heartbeat_idle_time' => 65, 'heartbeat_idle_time' => 65,
'ssl_cert_file' => base_path() . '/tests/textcert/4544322_iot.zhkjgf.com_chain', 'ssl_cert_file' => base_path() . '/tests/textcert/4544322_iot.zhkjgf.com_public.crt',
'ssl_key_file' => base_path() . '/tests/textcert/4544322_iot.zhkjgf.com.key', 'ssl_key_file' => base_path() . '/tests/textcert/4544322_iot.zhkjgf.com.key',
'ssl_verify_peer' => true, 'ssl_verify_peer' => true,
'ssl_allow_self_signed' => true, 'ssl_allow_self_signed' => true,
'ssl_client_cert_file' => base_path() . '/tests/textcert/4544322_iot.zhkjgf.com_public.crt', 'ssl_client_cert_file' => base_path() . '/tests/textcert/4544322_iot.zhkjgf.com_chain',
]); ]);
//监听连接进入事件 //监听连接进入事件
$this->tcp->on('Connect', function ($serv, $fd) { $this->tcp->on('Connect', function ($serv, $fd) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment