getAllGatewayAddressesFromRegister fail. tcp://127.0.0.1:5408 return 'HTTP/1.1 400 Bad Request

username880

[attach]1760[/attach]
大佬们,这是什么问题啊

5908 3 0
3个回答

walkor 打赏

根据手册 GatewayClient的registerAddress应该是regiser服务的地址和端口,并不是gateway的端口或者其它端口。你这个端口明显错了。

  • zhule 2020-09-14

    protected static $businessWorker = null;
    public static $registerAddress = '*****:1238';

    $register = new Register('text://0.0.0.0:1238');这样配置没错吧

zhule
protected static $businessWorker = null;
public static $registerAddress = '*****:1238';

$register = new Register('text://0.0.0.0:1238');这样配置没错吧
six

GatewayClient用法

use GatewayClient\Gateway;
Gateway::$registerAddress = '127.0.0.1:1238'; // <====关键这里要对
Gateway::sendToXXXX(...);

http://doc2.workerman.net/push-in-other-project.html
手册介绍的已经很明白了啊,用法也超级简单,咋会错呢

  • 暂无评论
年代过于久远,无法发表回答
×
🔝