AbridgedPacketCodec class

Packet codec for the TCP Abridged transport mode.

The initial tag byte 0xEF is sent after connecting. Packet lengths are encoded in units of 4 bytes (since all TL payloads are 4-byte aligned):

  • If length/4 < 127: a single byte holds the value.
  • Otherwise: 0x7F followed by 3 little-endian bytes for length/4.
Inheritance

Constructors

AbridgedPacketCodec()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tag Uint8List?
Optional tag bytes sent immediately after connecting.
no setteroverride

Methods

encodePacket(Uint8List data) Uint8List
Wraps data into a transport-level packet.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readPacket(BufferedReader reader) Future<Uint8List>
Reads and decodes one complete packet from the reader buffer.
override
toString() String
A string representation of this object.
inherited

Operators

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