array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ja', ), 'this' => array ( 0 => 'function.swoole-async-read.php', 1 => 'swoole_async_read', ), 'up' => array ( 0 => 'ref.swoole-funcs.php', 1 => 'Swoole 関数', ), 'prev' => array ( 0 => 'function.swoole-async-dns-lookup.php', 1 => 'swoole_async_dns_lookup', ), 'next' => array ( 0 => 'function.swoole-async-readfile.php', 1 => 'swoole_async_readfile', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/swoole/functions/swoole-async-read.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PECL swoole >= 1.9.0)
swoole_async_read — Read file stream asynchronously
$filename
,$callback
,$chunk_size
= 65536,$offset
= 0
filename
The filename of the file being read.
callback
filename
The name of the file.
content
The content readed from the file stream.
chunk_size
The chunk length.
offset
The offset.
Whether the read is succeed.