ThinkPHP6 + think-swoole 中拿到 swoole中的 server 和 onRequest 事件,并执行http推送
首要前提,必须安装 think-swoole 地址: https://github.com/top-think/think-swoole 1. 新建自定义Event,放到你自己的任意的目录中,如下: class OnRequestEvent { /** * @var Server */ protected $server; /** * @var App */ protected $app; pub…