fixed workerman ip
This commit is contained in:
parent
9d24f39dfa
commit
0f2c0e0982
@ -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";
|
||||
}
|
||||
|
||||
//获取场景值
|
||||
|
@ -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';
|
||||
|
@ -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;
|
||||
|
@ -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'))
|
||||
|
@ -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 类
|
||||
|
@ -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 不能平滑重启,否则会导致连接断开
|
||||
|
@ -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';
|
||||
|
||||
/**
|
||||
* 秘钥
|
||||
|
2
vendor/workerman/gatewayclient/Gateway.php
vendored
2
vendor/workerman/gatewayclient/Gateway.php
vendored
@ -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';
|
||||
|
||||
/**
|
||||
* 秘钥
|
||||
|
2
vendor/workerman/gatewayclient/README.md
vendored
2
vendor/workerman/gatewayclient/README.md
vendored
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user