tp3.2使用gatewayworek在Gateway::sendToUid报127.0.0.1:1236错误

fy1031239048

在服务器上单机部署,已经关闭防火(centos7.3),
[attach]880[/attach]
我的配置是这样,gatewayworker与项目同级部署
[attach]866[/attach]
,然后start_businessworker.php
[attach]869[/attach]
,start_register.php
[attach]872[/attach]
,start_gateway.php
[attach]870[/attach]
这三个文件的$gateway->registerAddress = '127.0.0.1:1236';都是这样不变 只更改start_gateway.php的$gateway = new Gateway("websocket://0.0.0.0:8282");然后我从官网下载了GatewayClient把里面的gateway.php改文件名gateway.class.php放置项目的/wfx/ThinkPHP/Library/Org/Util下面
[attach]871[/attach]
然后在项目中使用绑定用户Id 和对某个用户进行私聊
[attach]873[/attach]
js代码
[attach]875[/attach]
启动
[attach]876[/attach]
阿里云端口都设置了
[attach]877[/attach]
然后在网站上给别人发消息,可以绑定用户id bind这个post有返回值但是message给别人发消息触发 Gateway::sendToUid($recuid, json_encode($mess));报错
[attach]878[/attach]
错误内容是gateway.class.php,也就是GatewayClient文件中的gateway.php,代码如下
[attach]879[/attach]

3946 0 0
0个回答

年代过于久远,无法发表回答
🔝