GatewayClient
GatewayClient copied to clipboard
Sdk For GatewayWorker
我的tp项目和gateworker部署在通一台服务器上,gateworker启动成功并运行正常。   .但是在tp中用GatewayClient向客户端发送消息的时候报错Can not connect to tcp://127.0.0.1:1238。  昨天还好好的,不知道为啥突然报错了,有大佬帮忙看看嘛
执行代码 ```php Gateway::$registerAddress = "{$host}:{$port}"; echo "register=", Gateway::$registerAddress, PHP_EOL; while(true) { var_dump([ 'Gateway::getAllUidCount()' => Gateway::getAllUidCount(), 'getClientIdByUid' => Gateway::getClientIdByUid('123'), ]); sleep(1); } ``` 执行的日志 ```log [centos@ip-172-20-4-112 GatewayWorker]$ php -f ./bin/demo.php register=127.0.0.1:1239...
This is exception message : Allowed memory size of 134217728 bytes exhausted (tried to allocate 659456 bytes) {"exception":"[object] (Symfony\\Component\\ErrorHandler\\Error\\FatalError(code: 0): Allowed memory size of 134217728 bytes exhausted (tried to allocate...
Hi, My friend: this is my question. I used this client in my project. there are two workman-server in my project . I need to send the same message to...
当前系统 windows11 + wsl Ubuntu 20.04 开发环境 Workerman version:4.1.14 PHP version:8.2.13 laravel 8.7.5 Win IP地址 10.10.30.230 Ubuntu IP地址 172.18.232.186 win启用网络转发:netsh interface portproxy add v4tov4 listenport=2346 listenaddress=10.10.30.230 connectport=2346 connectaddress=172.18.232.186 ErrorException: stream_socket_server():...
宿主机ip 192.168.188.88 php容器映射端口 9138:9138 php容器内运行php8: $gateway->lanIp = "127.0.0.1";能正常访问,  改为'192.168.188.88'; 就会报错: 
根据文档,先连Gateway::$registerAddress 然后客户端的client_id在客户端通过http请求的时候 已经知道了她的ID 所以 是不是 1 先连Gateway::$registerAddress 2 可以直接在Gateway::sendToClient($client_id, $data); 还请不吝赐教
我是刚开始使用gateway 按文档指引。就让她做一个中转传送消息。 所以应用那边收到请求后 需要用到gatewayclient来向gateway发送消息给客户端。 当下进来gatewayclient 文档说明中 3.8版本以上 使用的是这个。但是点进来后 就这么个文件 没有其他指引了。 还是说我依然直接composer gatewayclient就可以了。