123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- <?php
- use \Workerman\Worker;
- use \GatewayWorker\Gateway;
- require_once __DIR__ . '/../../vendor/autoload.php';
- if (Config['gateway']['is_run']) {
-
- $gateway = new Gateway("tcp://0.0.0.0:" . Config['gateway']['port']);
- $gateway->name = Config['name'] . 'Gateway';
- $gateway->count = Config['gateway']['count'];
- $gateway->lanIp = Config['gateway_lanIp'];
- $gateway->startPort = Config['gateway']['startPort'];
- $gateway->registerAddress = Config['registerAddress'];
- $gateway->pingInterval = Config['gateway']['pingInterval'];
- $gateway->pingNotResponseLimit = Config['gateway']['pingNotResponseLimit'];
- $gateway->pingData = '';
- if (!defined('GLOBAL_START')) {
- Worker::runAll();
- }
- }
|