UDXPacket class
A UDX packet with stream information and a list of frames.
Constructors
-
UDXPacket({int version = currentVersion, required ConnectionId destinationCid, required ConnectionId sourceCid, required int destinationStreamId, required int sourceStreamId, required int sequence, required List<
Frame> frames, DateTime? sentTime}) - Creates a new UDX packet
- UDXPacket.fromBytes(Uint8List bytes)
-
Creates a UDX packet from raw bytes.
New header format (variable length):
0-3: version (4 bytes)
4: destinationCidLength (1 byte)
5 to 5+destCidLen: destinationConnectionId
5+destCidLen: sourceCidLength (1 byte)
6+destCidLen to 6+destCidLen+srcCidLen: sourceConnectionId
Next 4: sequence
Next 4: destinationStreamId
Next 4: sourceStreamId
Rest: frames
factory
Properties
- destinationCid → ConnectionId
-
The destination Connection ID.
final
- destinationStreamId → int
-
The ID of the stream at the destination
final
-
frames
→ List<
Frame> -
The list of frames in the packet
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAcked ↔ bool
-
Whether the packet has been acknowledged
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sentTime ↔ DateTime?
-
The time the packet was sent
getter/setter pair
- sequence → int
-
The sequence number
final
- sourceCid → ConnectionId
-
The source Connection ID.
final
- sourceStreamId → int
-
The ID of the stream at the source
final
- version → int
-
The protocol version (4 bytes)
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toBytes(
) → Uint8List - Converts the UDX packet to raw bytes
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- currentVersion → const int
- The current UDX protocol version