Packet class

Packet Structure:

  • 1 byte: Forwards count (number of times the packet has been forwarded)
  • 1 byte: Packet type (regular, confirmable, confirmation)
  • 6 bytes: IssuedAt (Unix timestamp with milliseconds)
  • 8 bytes: Message ID (unique identifier of the message)
  • 64 bytes: Source Peer ID (identifier of the sending peer)
  • 64 bytes: Destination Peer ID (identifier of the receiving peer)
  • 0 or >48 bytes: Encrypted payload (optional data, encrypted for security)
  • 64 bytes: Signature (used for message authentication)

Constructors

Packet({required FullAddress srcFullAddress, required Uint8List datagram, required PacketHeader header})

Properties

datagram Uint8List
final
dstPeerId PeerId
latefinal
hashCode int
The hash code for this object.
no setterinherited
final
payload Uint8List
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
srcFullAddress FullAddress
final
srcPeerId PeerId
latefinal

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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