nfauchelle/ phergie-keep-alive
Phergie 插件,用于监控连接上的最后活动时间,如果超过一定时间限制,则关闭连接并重新创建
v1.0.0
2015-02-25 06:30 UTC
Requires
Requires (Dev)
- phake/phake: 2.0.0-beta2
- phpunit/phpunit: 4.5.*
This package is not auto-updated.
Last update: 2024-09-28 16:57:01 UTC
README
Phergie 插件,用于监控连接的活跃状态,如果达到超时,将尝试重新连接。
安装
推荐的安装方法是通过 composer。
{ "require": { "nfauchelle/phergie-keep-alive": "~1.0.0" } }
或使用以下命令,它将自动检测最新版本并将其与 ~
绑定。
composer require nfauchelle/phergie-keep-alive
有关安装和启用插件的更多信息,请参阅 Phergie 文档。
配置
new \Phergie\Irc\Plugin\React\KeepAlive\Plugin(array( // Seconds of inactivity before attmping reconnect 'timeout' => 600, // Quit message on reconnect 'quitMessage' => 'Ping timeout, reconnecting...' ))
测试
运行单元测试套件
curl -s https://getcomposer.org/installer | php
php composer.phar install
./vendor/bin/phpunit
许可证
在 BSD 许可证下发布。请参阅 LICENSE
。