- PHP 手册
- 函数参考
- 其它服务
- Event
- EventBuffer
EventBuffer::readFrom
(PECL event >= 1.7.0)
EventBuffer::readFrom — Read data from a file onto the end of the buffer
说明
public EventBuffer::read( mixed$fd
,
int
$howmuch
): int
Read data from the file specified by
fd
onto the end of the buffer.
参数
-
fd
-
Socket resource, stream, or numeric file descriptor.
-
howmuch
-
Maxmimum number of bytes to read.
返回值
Returns the number of bytes read, or false
on failure.
参见
- EventBuffer::copyout() - Copies out specified number of bytes from the front of the buffer
- EventBuffer::drain() - Removes specified number of bytes from the front of the buffer without copying it anywhere
- EventBuffer::pullup() - Linearizes data within buffer and returns it's contents as a string
- EventBuffer::readLine() - Extracts a line from the front of the buffer
- EventBuffer::appendFrom() - Moves the specified number of bytes from a source buffer to the end of the current buffer
User Contributed Notes
There are no user contributed notes for this page.官方地址:https://www.php.net/manual/en/eventbuffer.readfrom.php