photon/worker-download
最新稳定版本:v1.1.7
Composer 安装命令:
composer require photon/worker-download
包简介
A worker to send large content without filling the RAM.
关键字:
README 文档
README
A worker to stream just-in-time a HTTP Response from a iterator
Quick start
-
Add the module in your project
composer require "photon/worker-download"
-
Add the worker in the configuration
'installed_tasks' => array( 'PhotonDownload' => '\photon\task\PhotonDownload', ), 'photon_task_PhotonDownload' => array( 'sub_addr' => 'tcp://127.0.0.1:11011', ),
-
Start the worker
hnu worker PhotonDownload
-
Send work to the worker in a view
public function m2stream($request, $match) { $ans = new \photon\http\Response(new MyStream); $ans->headers['Content-Length'] = 247463936;
\photon\task\PhotonDownload::createDownload($request, $ans); return false;}
统计信息
- 总下载量: 1.17k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: LGPL-2.1
- 更新时间: 2015-04-01