Moves the specified number of bytes from a source buffer to the end of the current buffer

EventBuffer::addBuffer
EventBuffer::__construct
EventBuffer
PHP Manual

# EventBuffer::appendFrom

(PECL event >= 1.6.0)

EventBuffer::appendFrom — Moves the specified number of bytes from a source buffer to the end of the current buffer

### Description

public int EventBuffer::appendFrom ( EventBuffer `$buf` , int `$len` )

Moves the specified number of bytes from a source buffer to the end of the current buffer. If there are fewer number of bytes, it moves all the bytes available from the source buffer.

### Parameters

`buf`

  Source buffer.

`len`

### Return Values

Returns the number of bytes read.

### Changelog

Version | Description
--- | ---
1.6.0 | Renamed EventBuffer::appendFrom()(the old method name) to EventBuffer::appendFrom().

### See Also

- 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::read() - Read data from an evbuffer and drain the bytes read

EventBuffer::addBuffer
EventBuffer::__construct
EventBuffer
PHP Manual