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 = 65536, int $offset = 0): bool
Parameters
filenameThe filename of the file being read.
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.