phasync
UnbufferedStream / append

Method

UnbufferedStream::append

Adds $chunk to the end of the stream.

Description#

public UnbufferedStream::append(
    string $chunk
): void

Returns at once while no more than $bufferSize bytes are unread, and otherwise waits until the reader has read enough.

Parameters#

$chunk string

Errors / Exceptions#

ExceptionWhen
RuntimeExceptionAfter end()
TimeoutExceptionWhen the reader makes no progress for $deadlockTimeout seconds

See also#

  • UnbufferedStream::endDeclares that nothing more will be appended, which lets a reader reach the end of the stream.