Swoole\Async::read
PHP function
Edit on GitHub ✎
(PECL swoole >= 1.9.0)
Read file stream asynchronously.
Description
Swoole\Async::read(string $filename, callable $callback, [int $chunk_size], [int $offset]): bool
Parameters
filenameThe name of the file.
callback- callback(string $filename, string $content): mixed
filenameThe name of the file.
contentThe content read from the file stream.
chunk_sizeThe chunk length.
offsetThe offset.
Return Values
Whether the read is succeed.