moebius/streams
Composer 安装命令:
composer require moebius/streams
包简介
Evented and asynchronous API for streaming data
README 文档
README
Provides a powerful API for generating PSR-7 compliant streams.
Allows connecting a writable stream to a readable stream. When writing to the writable stream, the readable stream can be read and vice versa.
Moebius\Streams\SourceInterface
Represents a stream of bytes coming from any source.
SourceInterface::write(string $chunk) adds a chunk of bytes to the byte stream. The
function will block if any of the readers have requested that the byte stream pause.
SourceInterface::end() signals that the byte stream is complete, and is interpreted
as end-of-file when consumed by a ReadableStream.
Moebius\Streams\ReadableStream
Class implements the Psr\Http\Message\StreamInterface and provides read access to
the data stream.
Moebius\Stream\WritableStream
Class implements the Psr\Http\Message\StreamInterface and provides write access to
the data stream.
统计信息
- 总下载量: 4
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-06-27