p2plib
library
Classes
-
AddressProperties
-
Represents properties associated with a network address.
-
Crypto
-
Provides cryptographic functionalities for encrypting, decrypting, signing,
and verifying data.
-
FullAddress
-
-
Message
-
Message Structure:
-
Packet
-
Packet Structure:
-
Structure of a packet header:
-
PeerId
-
A Peer ID is a 64-byte value composed of two 32-byte keys:
-
Route
-
Represents a route to a peer in the network.
-
RouterBase
-
Abstract base class for network routers.
-
RouterL0
-
Basic router implementation for relaying and forwarding datagrams.
-
RouterL1
-
Enhanced router with confirmation and keepalive features.
-
RouterL2
-
Enhanced router with more high-level API for building rich client
applications.
-
RouterL3
-
Router implementation for Layer 3 (Network Layer).
-
Token
-
-
TransportBase
-
Base class for all transport implementations.
-
TransportUdp
-
A UDP transport implementation.
-
Uint8List
-
A fixed-length list of 8-bit unsigned integers.
Functions
-
genRandomInt()
→ int
-
Generates a random integer using a cryptographically secure random number
generator.
-
getRandomBytes(int length)
→ Uint8List
-
Generates a list of random bytes of the specified length.
Typedefs
-
InitRequest
= ({Uint8List? seed, SendPort sendPort})
-
-
InitResponse
= ({Uint8List encPubKey, Uint8List seed, SendPort sendPort, Uint8List signPubKey})
-
-
InitResult
= ({Uint8List encPubKey, Uint8List seed, Uint8List signPubKey})
-
-
PeerStatus
= ({bool isOnline, PeerId peerId})
-
-
TaskError
= ({Object error, int id})
-
-
TaskRequest
= ({Uint8List datagram, int id, TaskType type})
-
-
TaskResult
= ({Uint8List datagram, int id})
-