DCUtRMessage class

DCUtR (Direct Connection Upgrade through Relay) message.

Serialize format: uint8 type + uint16 addr_length (big-endian) + addr_bytes

Per libp2p DCUtR spec, used for NAT hole punching coordination.

Constructors

DCUtRMessage({required int type, required List<int> observedAddr})

Properties

hashCode int
The hash code for this object.
no setteroverride
observedAddr List<int>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type int
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
serialize() Uint8List
Serialize to bytes: uint8 type + uint16 addr_length + addr_bytes.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

parse(Uint8List bytes) DCUtRMessage
Parse from bytes.

Constants

typeConnect → const int
typeSync → const int