【文件属性】:
文件名称:think-swoole:Swoole 为 thinkphp 扩展
文件大小:63KB
文件格式:ZIP
更新时间:2021-08-04 06:18:49
PHP
ThinkPHP Swoole 扩展
交流群:787100169
安装
首先按照Swoole官网说明安装swoole扩展,然后使用
composer require topthink/think-swoole
安装swoole扩展。
使用方法
直接在命令行下启动HTTP服务端。
php think swoole
启动完成后,默认会在0.0.0.0:80启动一个HTTP Server,可以直接访问当前的应用。
swoole的相关参数可以在config/swoole.php里面配置(具体参考配置文件内容)。
如果需要使用守护进程方式运行,建议使用supervisor来管理进程
【文件预览】:
think-swoole-4.0
----src()
--------Pool.php(2KB)
--------command()
--------Middleware.php(2KB)
--------contract()
--------rpc()
--------pool()
--------Websocket.php(3KB)
--------middleware()
--------FileWatcher.php(1KB)
--------websocket()
--------exception()
--------config()
--------resetters()
--------Service.php(898B)
--------concerns()
--------Table.php(2KB)
--------App.php(374B)
--------coroutine()
--------Sandbox.php(6KB)
--------helpers.php(339B)
--------Manager.php(2KB)
--------Http.php(1KB)
----LICENSE(11KB)
----phpunit.xml(820B)
----README.md(705B)
----tests()
--------ServerTest.php(237B)
--------bootstrap.php(6B)
----.gitignore(59B)
----composer.json(1KB)