Method
StringBuffer::await
Waits until the buffer has data to read or has ended.
Description#
public StringBuffer::await(
float $timeout = PHP_FLOAT_MAX
): voidReturns when data is available, the buffer has ended or failed, or the timeout has passed: it does not throw on a timeout, so check isReady() after it.
Parameters#
- $timeout float = PHP_FLOAT_MAX
- Seconds to wait at most
See also#
StringBuffer::isReadyReturns true if a read would not wait: data is buffered, or the buffer has ended or failed.