HH\Lib\IO\ReadHandle::readFixedSizeAsync
Read a fixed amount of data
public function readFixedSizeAsync(
int $size,
?int $timeout_ns = NULL,
): Awaitable<string>;
Will fail with EPIPE
if the file is closed before that much data is
available.
It is possible for this to never return, e.g. if called on a pipe or or socket which the other end keeps open forever. Set a timeout if you do not want this to happen.
Parameters
int $size
?int $timeout_ns = NULL