AMQP
in package
Table of Contents
Properties
- $debug : bool
Methods
- decode() : AbstractFrame|Buffer|null
- Decode package and emit onMessage($message) callback, $message is the result that decode returned.
- encode() : string|null
- Encode package before sending to client.
- input() : int
- Check the integrity of the package.
- reader() : ProtocolReader
- writer() : ProtocolWriter
Properties
$debug
public
static bool
$debug
= false
Methods
decode()
Decode package and emit onMessage($message) callback, $message is the result that decode returned.
public
static decode(string $buffer, ConnectionInterface $connection) : AbstractFrame|Buffer|null
Parameters
- $buffer : string
- $connection : ConnectionInterface
Return values
AbstractFrame|Buffer|nullencode()
Encode package before sending to client.
public
static encode(AbstractFrame|Buffer $data, ConnectionInterface $connection) : string|null
Parameters
- $data : AbstractFrame|Buffer
- $connection : ConnectionInterface
Return values
string|nullinput()
Check the integrity of the package.
public
static input(string $buffer, ConnectionInterface $connection) : int
Please return the length of package. If length is unknown please return 0 that means waiting for more data. If the package has something wrong please return -1 the connection will be closed.
Parameters
- $buffer : string
- $connection : ConnectionInterface
Return values
intreader()
public
static reader() : ProtocolReader
Return values
ProtocolReaderwriter()
public
static writer() : ProtocolWriter