服务器不响应tcp,一直连接不上TCP服务器,服务器防火墙已经关了

大家好,现在一直连接不上TCP服务器

代码如下:

// 新增8283端口,开启tcp协议

$gateway_tcp = new Gateway("tcp://0.0.0.0:8283");

// 进程名称,主要是status时方便识别

$gateway_tcp->name = 'GatewayTcp';

// 开启多少tcp协议的gateway进程

$gateway_tcp->count = 4;

// 本机ip(分布式部署时需要设置成内网ip)

$gateway_tcp->lanIp = '127.0.0.1';

// gateway内部通讯起始端口,起始端口不要重复

$gateway_tcp->startPort = 2500;

// 心跳间隔

$gateway_tcp->pingInterval = 10;

$gateway_tcp->pingNotResponseLimit = 2;

// 心跳数据

$gateway_tcp->pingData = 'ping';

// 设置服务注册地址(注意:这个地址是start_register.php中监听的地址)

$gateway_tcp->registerAddress = '127.0.0.1:1237';

// ######新增端口支持Text协议 结束##

$gateway_tcp->onConnect = function($connection)

{

$connection->send('Connected!');

};

if(!defined('GLOBAL_START'))

{

Worker::runAll();

}

服务器状态是下面这样,但是用网络助手连接TCP服务器就是连接不上,用的是腾讯云国外Linux服务器,防火墙已经关闭,请大家帮忙看看是怎么回事

----------------------------------------------GLOBAL STATUS----------------------------------------------------

Workerman version:3.5.5 PHP version:5.5.38

start time:2018-03-18 15:21:00 run 16 days 7 hours

load average: 0, 0, 0 event-loop:\Workerman\Events\Select

5 workers 17 processes

worker_name exit_status exit_count

BusinessWorker 0 0

Gateway 0 0

Register 0 0

GatewayTcp 0 0

GatewayText 0 0

----------------------------------------------PROCESS STATUS---------------------------------------------------

pid memory listening worker_name connections send_fail timers total_request qps status

19897 2M none BusinessWorker 13 0 0 7 0

19898 2M none BusinessWorker 13 0 0 9 0

19899 2M none BusinessWorker 13 0 0 9 0

19900 2M none BusinessWorker 13 0 0 7 0

19901 1.5M websocket://0.0.0.0:8288 Gateway 5 0 1 4 0

19902 1.5M websocket://0.0.0.0:8288 Gateway 5 0 1 4 0

19903 1.5M websocket://0.0.0.0:8288 Gateway 5 0 1 4 0

19904 1.5M websocket://0.0.0.0:8288 Gateway 5 0 1 4 0

19905 1.5M text://0.0.0.0:1237 Register 16 0 0 16 0

19906 1.5M tcp://0.0.0.0:8283 GatewayTcp 5 0 1 4 0

19907 1.5M tcp://0.0.0.0:8283 GatewayTcp 5 0 1 4 0

19908 1.5M tcp://0.0.0.0:8283 GatewayTcp 5 0 1 4 0

19909 1.5M tcp://0.0.0.0:8283 GatewayTcp 5 0 1 4 0

19910 1.5M text://0.0.0.0:7070 GatewayText 5 0 0 4 0

19911 1.5M text://0.0.0.0:7070 GatewayText 5 0 0 4 0

19912 1.5M text://0.0.0.0:7070 GatewayText 5 0 0 4 0

19913 1.5M text://0.0.0.0:7070 GatewayText 5 0 0 4 0

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值