up. 添加gateway event类
This commit is contained in:
parent
73ae0cf33e
commit
87dc171497
@ -49,7 +49,7 @@ class SysGateway extends Command
|
||||
* 业务处理器
|
||||
*/
|
||||
$worker = new BusinessWorker();
|
||||
$worker->name = 'ChatBusinessWorker';
|
||||
$worker->name = 'AdminBusinessWorker';
|
||||
$worker->count = 4;
|
||||
$worker->registerAddress = '127.0.0.1:1236';
|
||||
$worker->eventHandler = AdminGatewayEvents::class;
|
||||
@ -66,9 +66,9 @@ class SysGateway extends Command
|
||||
private function startGateway(): \GatewayWorker\Gateway
|
||||
{
|
||||
// gateway 进程
|
||||
$gateway = new \GatewayWorker\Gateway("Websocket://0.0.0.0:7272");
|
||||
$gateway = new \GatewayWorker\Gateway("Websocket://0.0.0.0:19981");
|
||||
// 设置名称,方便status时查看
|
||||
$gateway->name = 'ChatGateway';
|
||||
$gateway->name = 'AdminGateway';
|
||||
// 设置进程数,一般两个进程就足够
|
||||
$gateway->count = 2;
|
||||
// 分布式部署时请设置成内网ip(非127.0.0.1)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user