Swoole swoole_async_read

(PECL swoole >= 1.9.0)

swoole_async_read — 비동기적으로 파일 스트림 읽기


설명

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

매개변수

filename
읽고 있는 파일의 파일 이름입니다.
callback

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

filename
파일의 이름입니다.
content
파일 스트림에서 읽은 콘텐츠입니다.
chunk_size
청크 길이.
offset
오프셋.

반환 값

읽기 성공 여부입니다.