Commit ed885a79 authored by Administrator's avatar Administrator

更新swoole

parent afd4ade7
Pipeline #196 canceled with stages
......@@ -57,7 +57,7 @@ class swoole extends Command
{
$url = config('public.swoolwebsocketurl');
$por = config('public.swoolwebsocketurlpor');
$this->ws = new \swoole_websocket_server('0.0.0.0', 9502|SWOOLE_PROCESS, 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(
'reactor_num' => 2, //reactor线程数
'worker_num' => 4, //worker进程数
......
......@@ -59,7 +59,6 @@ class swooleMeTcp extends Command
$this->tcp = new \swoole_server('0.0.0.0', 9503,SWOOLE_PROCESS);
$this->tcp->addlistener('0.0.0.0', 9504,SWOOLE_SOCK_TCP); // 添加 TCP端口监听
$this->tcp->addlistener('0.0.0.0', 9505,SWOOLE_SOCK_TCP); // 添加 TCP端口监听
// $this->tcp->addlistener('0.0.0.0', 9506,SWOOLE_SOCK_TCP); // 添加 TCP端口监听
$this->tcp->set([
'worker_num' => 2,//设置启动的 Worker 进程数
'max_request' =>30,//最大任务数
......
......@@ -56,7 +56,7 @@ class zehongTcp extends Command
public function start()
{
$url = config('public.swooletcpurl');
$this->tcp = new \swoole_server('0.0.0.0', 9503, SWOOLE_PROCESS);
$this->tcp = new \swoole_server('0.0.0.0', 9506, SWOOLE_PROCESS);
$this->tcp->set([
'worker_num' => 2,//设置启动的 Worker 进程数
'max_request' => 30,//最大任务数
......@@ -106,4 +106,4 @@ class zehongTcp extends Command
}
}
}
\ No newline at end of file
}
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