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, Duration? 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

dataBytes → int
The stream data this packet carries, in bytes: what the congestion window and flow control account in. Retransmission carries the frames over, so it is the same under every sequence the packet is sent under.
no setter
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
isProbe ↔ bool
A path-MTU probe (MtuDiscovery): numbered and tracked so its ACK or loss is reported, but never re-sent, not booked in flight, and no congestion signal when lost.
getter/setter pair
lastRetransmit ↔ Duration?
getter/setter pair
lastSentTime ↔ Duration?
When the packet last went on the wire: its first send, then each retransmission. The RTT is sampled from here (RFC 9002 section 5.1): a resend carries a fresh sequence, so its ACK names this send and no other. Instants are on the Clock the connection runs on.
getter/setter pair
retransmitCount ↔ int
How many times this packet has been retransmitted, and when it last was. Used to space attempts and to collapse a near-simultaneous RTO timer and fast-retransmit into a single re-send.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sentTime ↔ Duration?
The ORIGINAL send time, set once and not moved by a retransmission — its only reader, persistent-congestion detection, measures how long the packet has gone undelivered. Per-retransmission timing lives in lastRetransmit.
getter/setter pair
sequence ↔ int
The sequence number.
getter/setter pair
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
wireSize ↔ int?
The datagram's length as sent, set by the sender; what the path-MTU search judges a packet by.
getter/setter pair

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.