Reads frames from the peer.
https://tools.ietf.org/html/rfc6455#section-5
TODO: Support unmasked frames.
Protected Properties | |
string | $buffer = '' |
Peer read buffer. More... | |
WebSocketClient | $client |
null array | $header |
Frame header buffer. More... | |
int | $maxLength = 128 * 1024 |
Maximum inbound per-frame payload length (fragment). More... | |
int | $rsv = 0 |
RSV bit mask claimed by extensions. More... | |
const | REGEXP |
https://tools.ietf.org/html/rfc6455#section-5.2 More... | |
Public Methods | |
__construct (WebSocketClient $client) | |
Generator Frame[] | getFrames () |
Yields all available frames from the peer. More... | |
int | getMaxLength () |
int | getRsv () |
$this | setMaxLength (int $bytes) |
$this | setRsv (int $rsv) |
Protected Methods | |
null Frame | getFrame () |
Reads and returns a single pending frame from the buffer, or nothing. More... | |
null array | getFrame_header () |
https://tools.ietf.org/html/rfc6455#section-5.2 More... | |
Frame | newFrame (string $payload) |
Frame factory. More... | |
|
protected |
Peer read buffer.
|
protected |
Frame header buffer.
|
protected |
Maximum inbound per-frame payload length (fragment).
Must be greater than or equal to 125
Defaults to 128 KiB.
|
protected |
RSV bit mask claimed by extensions.
|
protected |
__construct | ( | WebSocketClient | $client | ) |
WebSocketClient | $client |
|
protected |
Reads and returns a single pending frame from the buffer, or nothing.
WebSocketError |
|
protected |
https://tools.ietf.org/html/rfc6455#section-5.2
Generator Frame [] getFrames | ( | ) |
Yields all available frames from the peer.
int getMaxLength | ( | ) |
int getRsv | ( | ) |
$this setMaxLength | ( | int | $bytes | ) |
int | $bytes |
$this setRsv | ( | int | $rsv | ) |
int | $rsv |