可以在webman里面启动2个 gatewayworker吗

如题

在配置文件里面只能设置一个 gateway和一个worker,有2个websocket,一个7273,一个7272,应该怎么在webman里面配置呢?

return [
'gateway' => [
'handler' => Gateway::class,
'listen' => 'websocket://0.0.0.0:7272',
'count' => cpu_count(),
'reloadable' => false,
'constructor' => ['config' => [
'lanIp' => '127.0.0.1',
'startPort' => 2300,
'pingInterval' => 25,
'pingData' => '{"type":"ping"}',
'registerAddress' => '127.0.0.1:1236',
'onConnect' => function(){},
]]
],
'worker' => [
'handler' => BusinessWorker::class,
'count' => cpu_count()*2,
'constructor' => ['config' => [
'eventHandler' => plugin\webman\gateway\Events::class,
'name' => 'ChatBusinessWorker',
'registerAddress' => '127.0.0.1:1236',
]]
],
'register' => [
'handler' => Register::class,
'listen' => 'text://0.0.0.0:1236',
'count' => 1, // Must be 1
'constructor' => []
],
];

798 1 0
1个回答

Gin

截图 多搞几个目录 看我多少个

  • 暂无评论
年代过于久远,无法发表回答
×
🔝