fixed workerman ip

This commit is contained in:
weiz 2023-10-20 17:47:22 +08:00
parent 9d24f39dfa
commit 0f2c0e0982
9 changed files with 9 additions and 9 deletions

View File

@ -17,7 +17,7 @@ class ImController extends BaseLikeAdminController
public function __construct(App $app)
{
parent::__construct($app);
Gateway::$registerAddress = "127.0.0.1:1256";
Gateway::$registerAddress = "172.19.97.179:1256";
}
//获取场景值

View File

@ -17,7 +17,7 @@ $worker->name = 'PushBusinessWorker';
$worker->count = 4;
// 服务注册地址
$worker->registerAddress = '127.0.0.1:1256';
$worker->registerAddress = '172.19.97.179:1256';
// 注册服务类
$worker->eventHandler = 'workerim\Events';

View File

@ -23,7 +23,7 @@ $gateway->lanIp = '172.19.97.179';
$gateway->startPort = 3900;
// 服务注册地址
$gateway->registerAddress = '127.0.0.1:1256';
$gateway->registerAddress = '172.19.97.179:1256';
// 心跳间隔
$gateway->pingInterval = 20;

View File

@ -6,7 +6,7 @@ use \GatewayWorker\Register;
require_once __DIR__ . '/../../vendor/autoload.php';
// register 必须是text协议切记不能将register端口开放给外网
$register = new Register('text://127.0.0.1:1256');
$register = new Register('text://172.19.97.179:1256');
// 如果不是在根目录启动则运行runAll方法
if(!defined('GLOBAL_START'))

View File

@ -43,7 +43,7 @@ class BusinessWorker extends Worker
*
* @var string|array
*/
public $registerAddress = '127.0.0.1:1236';
public $registerAddress = '172.19.97.179:1256';
/**
* 事件处理类,默认是 Event

View File

@ -83,7 +83,7 @@ class Gateway extends Worker
*
* @var string|array
*/
public $registerAddress = '127.0.0.1:1236';
public $registerAddress = '172.19.97.179:1256';
/**
* 是否可以平滑重启gateway 不能平滑重启,否则会导致连接断开

View File

@ -34,7 +34,7 @@ class Gateway
*
* @var string|array
*/
public static $registerAddress = '127.0.0.1:1236';
public static $registerAddress = '172.19.97.179:1256';
/**
* 秘钥

View File

@ -36,7 +36,7 @@ class Gateway
*
* @var string|array
*/
public static $registerAddress = '127.0.0.1:1236';
public static $registerAddress = '172.19.97.179:1256';
/**
* 秘钥

View File

@ -64,7 +64,7 @@ require_once '真实路径/vendor/autoload.php';
* === 如果GatewayClient和GatewayWorker在同一台服务器 ===
* GatewayClient和Register服务都在一台服务器上ip填写127.0.0.1及即可,无需其它设置。
**/
Gateway::$registerAddress = '127.0.0.1:1236';
Gateway::$registerAddress = '172.19.97.179:1256';
// GatewayClient支持GatewayWorker中的所有接口(Gateway::closeCurrentClient Gateway::sendToCurrentClient除外)
Gateway::sendToAll($data);