Documentation

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|null

encode()

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|null

input()

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
int

reader()

public static reader() : ProtocolReader
Return values
ProtocolReader

writer()

public static writer() : ProtocolWriter
Return values
ProtocolWriter

        
On this page

Search results