php8.5
Home/ Manual/ event / eventbuffer/ EventBuffer::readFrom

EventBuffer::readFrom

PHP function Edit on GitHub ✎

(PECL event >= 1.7.0)

Read data from a file onto the end of the buffer

Description

EventBuffer::read(mixed $fd, int $howmuch): int

Read data from the file specified by fd onto the end of the buffer.

Parameters

fd

Socket resource, stream, or numeric file descriptor.

howmuch

Maximum number of bytes to read.

Return Values

Returns the number of bytes read, or false on failure.

See Also

  • EventBuffer::copyout
  • EventBuffer::drain
  • EventBuffer::pullup
  • EventBuffer::readLine
  • EventBuffer::appendFrom

Source: reference/event/eventbuffer/readfrom.xml · from the official PHP manual (php/doc-en)