final class PacketEncoder implements EncodesPacket

Class PacketEncoder

Constants

private VERSION

private MAX_CONTENT_LENGTH

Methods

string
encodePacket(int $type, string $content, int $requestId)

Content that is longer than a record can hold is split into consecutive records of the same type.

array
decodeHeader(string $data)

No description

Details

at line 25
string encodePacket(int $type, string $content, int $requestId)

Content that is longer than a record can hold is split into consecutive records of the same type.

Empty content results in one empty record, which ends a stream.

Parameters

int $type
string $content
int $requestId

Return Value

string

at line 62
array decodeHeader(string $data)

No description

Parameters

string $data

Return Value

array