ReceiveReliabilityLayer
in package
Table of Contents
- $WINDOW_SIZE : int
- $ACKQueue : array<string|int, int>
- $highestSeqNumber : int
- $logger : Logger
- $maxConcurrentSplitPackets : int
- $maxSplitPacketPartCount : int
- $NACKQueue : array<string|int, int>
- $onRecv : Closure
- $receiveOrderedIndex : array<string|int, int>
- $receiveOrderedPackets : array<string|int, array<string|int, EncapsulatedPacket>>
- $receiveSequencedHighestIndex : array<string|int, int>
- $reliableWindow : array<string|int, bool>
- $reliableWindowEnd : int
- $reliableWindowStart : int
- $sendPacket : Closure
- $splitPackets : array<string|int, array<string|int, \raklib\protocol\EncapsulatedPacket|null>>
- $windowEnd : int
- $windowStart : int
- __construct() : mixed
- needsUpdate() : bool
- onDatagram() : void
- update() : void
- handleEncapsulatedPacket() : void
- handleEncapsulatedPacketRoute() : void
- handleSplit() : null|EncapsulatedPacket
- Processes a split part of an encapsulated packet.
Properties
$WINDOW_SIZE
public
static int
$WINDOW_SIZE
= 2048
$ACKQueue
private
array<string|int, int>
$ACKQueue
= []
$highestSeqNumber
private
int
$highestSeqNumber
= -1
$logger
private
Logger
$logger
$maxConcurrentSplitPackets
private
int
$maxConcurrentSplitPackets
$maxSplitPacketPartCount
private
int
$maxSplitPacketPartCount
Tags
$NACKQueue
private
array<string|int, int>
$NACKQueue
= []
$onRecv
private
Closure
$onRecv
Tags
$receiveOrderedIndex
private
array<string|int, int>
$receiveOrderedIndex
$receiveOrderedPackets
private
array<string|int, array<string|int, EncapsulatedPacket>>
$receiveOrderedPackets
$receiveSequencedHighestIndex
private
array<string|int, int>
$receiveSequencedHighestIndex
$reliableWindow
private
array<string|int, bool>
$reliableWindow
= []
$reliableWindowEnd
private
int
$reliableWindowEnd
$reliableWindowStart
private
int
$reliableWindowStart
$sendPacket
private
Closure
$sendPacket
Tags
$splitPackets
private
array<string|int, array<string|int, \raklib\protocol\EncapsulatedPacket|null>>
$splitPackets
= []
$windowEnd
private
int
$windowEnd
$windowStart
private
int
$windowStart
Methods
__construct()
public
__construct(Logger $logger, Closure $onRecv, Closure $sendPacket[, int $maxSplitPacketPartCount = PHP_INT_MAX ][, int $maxConcurrentSplitPackets = PHP_INT_MAX ]) : mixed
Parameters
- $logger : Logger
- $onRecv : Closure
- $sendPacket : Closure
- $maxSplitPacketPartCount : int = PHP_INT_MAX
- $maxConcurrentSplitPackets : int = PHP_INT_MAX
Tags
Return values
mixed —needsUpdate()
public
needsUpdate() : bool
Return values
bool —onDatagram()
public
onDatagram(Datagram $packet) : void
Parameters
- $packet : Datagram
Return values
void —update()
public
update() : void
Return values
void —handleEncapsulatedPacket()
private
handleEncapsulatedPacket(EncapsulatedPacket $packet) : void
Parameters
- $packet : EncapsulatedPacket
Return values
void —handleEncapsulatedPacketRoute()
private
handleEncapsulatedPacketRoute(EncapsulatedPacket $pk) : void
Parameters
- $pk : EncapsulatedPacket
Return values
void —handleSplit()
Processes a split part of an encapsulated packet.
private
handleSplit(EncapsulatedPacket $packet) : null|EncapsulatedPacket
Parameters
- $packet : EncapsulatedPacket
Return values
null|EncapsulatedPacket —Reassembled packet if we have all the parts, null otherwise.