SendReliabilityLayer
in package
Table of Contents
- $messageIndex : int
- $mtuSize : int
- $needACK : array<string|int, array<string|int, int>>
- $onACK : Closure
- $reliableCache : array<string|int, ReliableCacheEntry>
- $resendQueue : array<string|int, ReliableCacheEntry>
- $sendDatagramCallback : Closure
- $sendOrderedIndex : array<string|int, int>
- $sendQueue : array<string|int, EncapsulatedPacket>
- $sendSeqNumber : int
- $sendSequencedIndex : array<string|int, int>
- $splitID : int
- __construct() : mixed
- addEncapsulatedToQueue() : void
- needsUpdate() : bool
- onACK() : void
- onNACK() : void
- sendQueue() : void
- update() : void
- addToQueue() : void
- sendDatagram() : void
Properties
$messageIndex
private
int
$messageIndex
= 0
$mtuSize
private
int
$mtuSize
Tags
$needACK
private
array<string|int, array<string|int, int>>
$needACK
= []
$onACK
private
Closure
$onACK
Tags
$reliableCache
private
array<string|int, ReliableCacheEntry>
$reliableCache
= []
$resendQueue
private
array<string|int, ReliableCacheEntry>
$resendQueue
= []
$sendDatagramCallback
private
Closure
$sendDatagramCallback
Tags
$sendOrderedIndex
private
array<string|int, int>
$sendOrderedIndex
$sendQueue
private
array<string|int, EncapsulatedPacket>
$sendQueue
= []
$sendSeqNumber
private
int
$sendSeqNumber
= 0
$sendSequencedIndex
private
array<string|int, int>
$sendSequencedIndex
$splitID
private
int
$splitID
= 0
Methods
__construct()
public
__construct(int $mtuSize, Closure $sendDatagram, Closure $onACK) : mixed
Parameters
- $mtuSize : int
- $sendDatagram : Closure
- $onACK : Closure
Tags
Return values
mixed —addEncapsulatedToQueue()
public
addEncapsulatedToQueue(EncapsulatedPacket $packet[, bool $immediate = false ]) : void
Parameters
- $packet : EncapsulatedPacket
- $immediate : bool = false
Return values
void —needsUpdate()
public
needsUpdate() : bool
Return values
bool —onACK()
public
onACK(ACK $packet) : void
Parameters
- $packet : ACK
Return values
void —onNACK()
public
onNACK(NACK $packet) : void
Parameters
- $packet : NACK
Return values
void —sendQueue()
public
sendQueue() : void
Return values
void —update()
public
update() : void
Return values
void —addToQueue()
private
addToQueue(EncapsulatedPacket $pk, bool $immediate) : void
Parameters
- $pk : EncapsulatedPacket
- $immediate : bool
Return values
void —sendDatagram()
private
sendDatagram(array<string|int, EncapsulatedPacket> $packets) : void
Parameters
- $packets : array<string|int, EncapsulatedPacket>