« swoole_async_dns_lookup
swoole_async_readfile »

swoole_async_read

(PECL swoole >= 1.9.0)

swoole_async_read — Read file stream asynchronously

説明

function swoole_async_read(
    string $filename,
    callable $callback,
    int $chunk_size = 65536,
    int $offset = 0
): bool

パラメータ

filename

The filename of the file being read.

callback
function callback(string $filename, string $content): mixed
filename

The name of the file.

content

The content read from the file stream.

chunk_size

The chunk length.

offset

The offset.

戻り値

Whether the read is succeed.

関連キーワード:
swoole   read   async   filename   stream   Read   asynchronously   callback   chunk   offset   content   size   lookup   readfile   Swoole   callable   mixed   length   Whether   succeed
関連する関数・ページ:
function.swoole-async-readfile   function.swoole-async-write   swoole-async.read   function.swoole-async-writefile   ref.swoole-funcs   function.swoole-async-set