PacketIdGenerator

Packet ID generator Holds the status of ID usage and generates the next ones.

It's a thread safe singleton

Members

Functions

isUsed
auto isUsed(ushort id)

Is packet id currently used?

setUnused
void setUnused(ushort id)

Sets packet id as unused

setUsed
void setUsed(ushort id)

Sets packet id as used

Properties

get
PacketIdGenerator get [@property getter]

Instance of Packet ID generator

nextPacketId
auto nextPacketId [@property getter]

Gets next packet id. If the session is full it won't return till there is free space again

Meta