Packets
Packets are classes which represent specific requests and responses, containing a packet id and any number of Objects.
Packets are generally encoded and decoded using Segments.
Constructors | |
---|---|
encoder | Encodes some objects into packet data |
decoder | Initialises a packet with packet data to be decoded |
Important Methods | |
---|---|
decode | Attempts to decode the packet. Returns true if there was enough data available and the packet was successfully decoded |
handle | Handles the packet if it has been decoded (performs packet-specific functionality using the Objects decoded from the packet) |