Datagram
extends Packet
in package
Table of Contents
- BITFLAG_ACK = 0x40
- BITFLAG_CONTINUOUS_SEND = 0x8
- BITFLAG_NAK = 0x20
- BITFLAG_NEEDS_B_AND_AS = 0x4
- BITFLAG_PACKET_PAIR = 0x10
- BITFLAG_VALID = 0x80
- HEADER_SIZE = 1 + 3
- $headerFlags : int
- $ID : int
- $packets : array<string|int, EncapsulatedPacket>
- $seqNumber : int
- decode() : void
- encode() : void
- length() : int
- decodeHeader() : void
- decodePayload() : void
- encodeHeader() : void
- encodePayload() : void
Constants
BITFLAG_ACK
public
mixed
BITFLAG_ACK
= 0x40
BITFLAG_CONTINUOUS_SEND
public
mixed
BITFLAG_CONTINUOUS_SEND
= 0x8
BITFLAG_NAK
public
mixed
BITFLAG_NAK
= 0x20
BITFLAG_NEEDS_B_AND_AS
public
mixed
BITFLAG_NEEDS_B_AND_AS
= 0x4
BITFLAG_PACKET_PAIR
public
mixed
BITFLAG_PACKET_PAIR
= 0x10
BITFLAG_VALID
public
mixed
BITFLAG_VALID
= 0x80
HEADER_SIZE
public
mixed
HEADER_SIZE
= 1 + 3
Properties
$headerFlags
public
int
$headerFlags
= 0
$ID
public
static int
$ID
= -1
$packets
public
array<string|int, EncapsulatedPacket>
$packets
= []
$seqNumber
public
int
$seqNumber
Methods
decode()
public
decode(PacketSerializer $in) : void
Parameters
- $in : PacketSerializer
Tags
Return values
void —encode()
public
encode(PacketSerializer $out) : void
Parameters
- $out : PacketSerializer
Return values
void —length()
public
length() : int
Return values
int —decodeHeader()
protected
decodeHeader(PacketSerializer $in) : void
Parameters
- $in : PacketSerializer
Return values
void —decodePayload()
protected
decodePayload(PacketSerializer $in) : void
Parameters
- $in : PacketSerializer
Return values
void —encodeHeader()
protected
encodeHeader(PacketSerializer $out) : void
Parameters
- $out : PacketSerializer
Return values
void —encodePayload()
protected
encodePayload(PacketSerializer $out) : void
Parameters
- $out : PacketSerializer