Packet class abstract interface

A Magpie whose header-level flags (A/B/C/D/E) and the two lengths are visible; this is the shape MessagePacket implements.

Implemented types
Implementers

Properties

ack → int
A (0x80): 1 = reply to the peer's request.
no setter
bid → int
B (0x40): 1 = bridge packet (carries target/source bids).
no setter
cmd → int
C (0x20): 1 = carries a command; 0 = plain DATA.
no setter
command → int
Command value (0 = empty command, plain DATA).
no setterinherited
count → int
Fragment count (1 for mini packets).
no setterinherited
dsn → int
D (0x10): 1 = carries an sn; 0 = system command.
no setter
ext → int
E (0x07): byte width of the index/count fields (0/2/4).
no setter
hashCode → int
The hash code for this object.
no setterinherited
headerLength → int
Full header length in bytes, buffer[5] (8 ~ 32).
no setter
index → int
Fragment index (0 for mini packets).
no setterinherited
payload → Uint8List
Payload bytes (empty for none).
no setterinherited
payloadLength → int
Payload length in bytes, buffer[6] << 8 | buffer[7].
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sn → int
Data serial number (0 for system commands).
no setterinherited
source → int
Source bridge id (0 = first handshake / server-down).
no setterinherited
target → int
Target bridge id (0 = addressed to the server).
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pack() → Uint8List
Pack this packet into the wire bytes (header + payload, + attachment for a ReliablePacket).
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited