GatewayWorker icon indicating copy to clipboard operation
GatewayWorker copied to clipboard

Distributed realtime messaging framework based on workerman.

Results 23 GatewayWorker issues
Sort by recently updated
recently updated
newest added

``` Gateway::$registerAddress = '172.17.16.7:5000'; Gateway::sendToUid(10120,$msg); Gateway::$registerAddress = '172.17.16.5:5000'; Gateway::sendToUid(10100,$msg); ``` 第二个会失败,打印日志里,数据还是发送到第一个的gateway中

公司要求客户端心跳连续成功一定次数之后,想让客户端下次更长时间之后再发送心跳 我看了下gatewayworker的心跳处理,没法实现,然后我在这个类上加上了一个公开属性$pingStepConf,默认值是 [ 0 => 1 ],0表示连续接收客户端发来的消息总数,1表示允许客户端未发送数据包给服务器的总数的倍数,就是不想改之前的心跳逻辑和心跳检测的定时器,直接在判断那里加了一个倍数$step 然后在start文件中,在实例化的Gateway类的对象里面,修改对象的属性pingStepConf, 例如:[ 0 => 1, 10 => 3, 30 => 5, 60 => 10 ] 假设:pingInterval = 10; pingNotResponseLimit = 1; 那么服务端允许客户端心跳时间间隔为: 当客户端连续发送数据给服务器计数为:0到9之间,发送心跳的时间间隔为10*1...

topthink/think-worker版本为:v2.0.12 gateway版本为:v3.0.18 异常一: unpack(): Type N: not enough input, need 4, have 1 in /xxx/vendor/workerman/gateway-worker/src/Protocols/GatewayProtocol.php:198 异常二: unserialize(): Error at offset 0 of 136 bytes in /xxx/vendor/workerman/gateway-worker/src/Protocols/GatewayProtocol.php:211

Gateway.php 1213行报stream_socket_sendto broken pipe错误

I am trying to make cluster (several machines with worker) with GatewayWorker, which serves websocket connections, can you make an advice with correct way?

1、我按照GatewayWorker的文档,在项目中安装webman/gateway-worker,但是在业务中如果想发送信息给客户端,我发现使用的是workerman/gateway-worker里面的文件,这里不太理解,这两个之间的关系 2、当我尝试检测一个失效的/无效的client_id的时候,Gateway::isOnline($client_id),这个方法,最终追溯到Context::clientIdToAddress($client_id),我发现,这里的抛异常,是echo,详见GatewayWorker\Lib\Context的第131行,这将导致webman的控制台出现大量的错误信息,并且该异常无法捕获到

businessWorker运行一段时间之后产生以下报错信息,使用K8S部署,启动3个pod,只有1个pod出现这问题,不会同时出现; ```php ------------------------------------------- WORKERMAN -------------------------------------------- Workerman version:4.1.11 PHP version:8.1.16 Event-Loop:\Workerman\Events\Event -------------------------------------------- WORKERS --------------------------------------------- proto user worker listen processes status tcp root BusinessWorker none 12 [OK] -------------------------------------------------------------------------------------------------- Press Ctrl+C to stop....

root@root 1.test % php public/vendor/webmsgsender/start.php start PHP Deprecated: auto_detect_line_endings is deprecated in /opt/homebrew/var/www/1.test/public/vendor/webmsgsender/vendor/vlucas/phpdotenv/src/Loader.php on line 162 Deprecated: auto_detect_line_endings is deprecated in /opt/homebrew/var/www/1.test/public/vendor/webmsgsender/vendor/vlucas/phpdotenv/src/Loader.php on line 162 PHP Deprecated: Creation of dynamic...

宿主机ip 192.168.188.88 php容器映射端口 9138:9138 php容器内运行php8: $gateway->lanIp = "127.0.0.1";能正常访问, ![image](https://user-images.githubusercontent.com/25482706/219432125-ddf69044-d9df-4da6-ad85-2ce3a8738f31.png) 改为'192.168.188.88'; 就会报错: ![image](https://user-images.githubusercontent.com/25482706/219432178-cf8b20ca-38af-4a30-b9b0-fa86e8d85ea4.png)