PacketBatch
in package
Table of Contents
- $buffer : string
- __construct() : mixed
- fromPackets() : PacketBatch
- Constructs a packet batch from the given list of packets.
- getBuffer() : string
- getPackets() : Generator|array<string|int, Packet>|array<string|int, null>
Properties
$buffer
private
string
$buffer
Methods
__construct()
public
__construct(string $buffer) : mixed
Parameters
- $buffer : string
Return values
mixed —fromPackets()
Constructs a packet batch from the given list of packets.
public
static fromPackets(PacketSerializerContext $context, Packet ...$packets) : PacketBatch
Parameters
- $context : PacketSerializerContext
- $packets : Packet
Return values
PacketBatch —getBuffer()
public
getBuffer() : string
Return values
string —getPackets()
public
getPackets(PacketPool $packetPool, PacketSerializerContext $decoderContext, int $max) : Generator|array<string|int, Packet>|array<string|int, null>
Parameters
- $packetPool : PacketPool
- $decoderContext : PacketSerializerContext
- $max : int