GatewayWorker 直接裸tcp, 出现fwrite(): send of 8192 bytes failed

$tcp_gateway = new Gateway("tcp://0.0.0.0:8898"); $gateway = new Gateway("Text://0.0.0.0:8282",$context); 对外提供两个Gateway服务, 从Text接收到的数据,转到到tcp上。 从tcp接收到的数据转到text上。 数据量大时,就出来 PHP Notice: fwri...

tmig 发表与 2021-11-20 1699 浏览 1 回答
想把workerman改成WINDOWS服务程序可行吗?方案如下。

workerman在WINDOWS下用命令行启动,有点不方便。想改成WINDOWS服务程序方式运行. 想法如下: 1,下载PHP的扩展:php_win32service.dll 2,在Select.php中修改: public function loop() { $e = null; while (1) { .... } } 改成: public function lo...

tmig 发表与 2015-10-24 3899 浏览 5 回答
websocket发送中文数据,客户端就会就会出onerror事件,连接就会断开!

$worker = new Worker('websocket://0.0.0.0:8484'); // 当有客户端连接事件时 $worker->onConnect = function($connection) { // 设置连接的onMessage回调 $connection->onMessage = function($connection, $data) { ...

tmig 发表与 2015-07-30 6759 浏览 2 回答

tmig

1965
积分
0
获赞数
0
粉丝数
2015-07-30 加入
🔝