Modules§
Macros§
- dequeue
- Macro to indefinitely await a channel
Receiver<pb::KaspadMessage>::recvcall and expect a specific payload type (without a timeout). Usage: - dequeue_
with_ request_ id - dequeue_
with_ timeout - Macro to await a channel
Receiver<pb::KaspadMessage>::recvcall with a default/specified timeout and expect a specific payload type. Usage: - make_
message - Wraps an inner payload message into a valid
KaspadMessage. Usage: - make_
request - make_
response - unwrap_
message - Macro to extract a specific payload type from an
Option<pb::KaspadMessage>. Usage: - unwrap_
message_ with_ request_ id
Structs§
- Adaptor
- The main object to create for managing a fully-fledged Kaspa P2P peer
- Hub
- Hub of active peers (represented as Router objects). Note that all public methods of this type are exposed through the Adaptor
- Incoming
Route - Kaspad
Handshake - Implements the Kaspa peer-to-peer handshake protocol
- Peer
- PeerKey
- Peer
Properties - Router
- A router object for managing the communication to a network peer. It is named a router because it’s responsible for internally routing messages to P2P flows based on registration and message types
- Shared
Incoming Route
Enums§
Constants§
Traits§
- Connection
Initializer - The main entrypoint for external usage of the P2P library. An impl of this trait is expected on P2P server initialization and will be called on each new (in/out) P2P connection with a corresponding dedicated new router