decodeSelf method
Decodes the current object from the given RawReader.
Implementation
@override
void decodeSelf(RawReader reader) {
// 16-bit source port
sourcePort = reader.readUint16();
// 16-bit destination port
destinationPort = reader.readUint16();
// 16-bit payload length
final payloadLength = reader.readUint16();
// 16-bit checksum (ignored)
reader.readUint16();
// Payload
payload = RawData.decode(reader, payloadLength);
}