|
@@ -18,22 +18,22 @@ use \Workerman\Autoloader;
|
|
|
require_once __DIR__ . '/../../vendor/autoload.php';
|
|
|
|
|
|
// gateway 进程
|
|
|
-$gateway = new Gateway("tcp://0.0.0.0:2346");
|
|
|
+$gateway = new Gateway("tcp://0.0.0.0:2349");
|
|
|
// 设置名称,方便status时查看
|
|
|
$gateway->name = 'ChatGateway';
|
|
|
// 设置进程数,gateway进程数建议与cpu核数相同
|
|
|
-$gateway->count = 4;
|
|
|
+$gateway->count = 1;
|
|
|
// 分布式部署时请设置成内网ip(非127.0.0.1)
|
|
|
$gateway->lanIp = '127.0.0.1';
|
|
|
// 内部通讯起始端口。假如$gateway->count=4,起始端口为2300
|
|
|
// 则一般会使用2300 2301 2302 2303 4个端口作为内部通讯端口
|
|
|
-$gateway->startPort = 2347;
|
|
|
+$gateway->startPort = 2350;
|
|
|
// 心跳间隔
|
|
|
$gateway->pingInterval = 10;
|
|
|
// 心跳数据
|
|
|
$gateway->pingData = '{"type":"ping"}';
|
|
|
// 服务注册地址
|
|
|
-$gateway->registerAddress = '127.0.0.1:2345';
|
|
|
+$gateway->registerAddress = '127.0.0.1:2348';
|
|
|
|
|
|
/*
|
|
|
// 当客户端连接上来时,设置连接的onWebSocketConnect,即在websocket握手时的回调
|