GateWayWorker使用自定义协议怎么使用GateWay类? 分布式的设置有变化吗?

小神龙

目前业务直接使用websocket协议,tcp协议,还有自定义协议3种,其中使用自定义协议是直接new Worker() 出来,怎么才可以使用GateWay类?会影响以后的分布式搭建吗?(现在是单机部署),消息收发的逻辑没有写在events.php里有影响吗?

1842 1 0
1个回答

six

new Gateway('协议://0.0.0.0:xxxx');

  • 小神龙 2020-03-18

    new Gateway 会报错出来Fatal error: Uncaught Exception: class \Protocols\LdLed not exist in /home/www/ld_tcp/vendor/workerman/workerman/Worker.php:2290,但是LdLed.这个文件是存在的,new Worker()就正常

  • 小神龙 2020-03-18

    啊,我知道了,引用路径。。。。打扰了哈,谢谢回复

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