Frame class
Discrete protocol frame as specified in protocol/wire-format.md ?6.1.
Prefix Header (3 bytes):
- 1 byte Frame Type
- 2 bytes Length (Big-Endian) Followed by Payload (0 to 65,535 bytes).
- Annotations
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- payload → Uint8List
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → int
-
final
- wireLength → int
-
Total wire size including 3-byte header.
no setter
Methods
-
encode(
) → Uint8List - Serializes the frame into 3-byte header + payload.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
decode(
Uint8List bytes, [int offset = 0]) → Frame -
Decodes a single frame from
bytesstarting atoffset. Throws FormatException if bytes is too short for header or payload.
Constants
- typeBlobData → const int
- typeBlobWant → const int
- typeBye → const int
- typeCertReq → const int
- typeCertResp → const int
- typeData → const int
- typeNoiseMsg1 → const int
- typeNoiseMsg2 → const int
- typeNoiseMsg3 → const int
- typeReceipts → const int
- typeRevocations → const int
- typeSummary → const int
- typeUpgradeAccept → const int
- typeUpgradeOffer → const int
- typeWant → const int