Crate pea2pea[][src]

Expand description

pea2pea is a P2P library designed with the following use cases in mind:

  • simple and quick creation of custom P2P networks
  • testing/verifying network protocols
  • benchmarking and stress-testing P2P nodes (or other network entities)
  • substituting other, “heavier” nodes in local network tests


pub use connections::Connection;
pub use connections::ConnectionSide;


Objects associated with connection handling.

Opt-in protocols available to the Node; each protocol is expected to spawn its own task that runs throughout the Node’s lifetime and handles a specific functionality. The communication with these tasks is done via dedicated handler objects.


The node’s configuration.

Contains statistics related to node’s peers, currently connected or not.

The central object responsible for handling all the connections.

Contains statistics related to a node.


The way in which nodes are connected to each other; used in connect_nodes.


A trait for objects containing a Node; it is required to implement protocols.


Connects the provided list of nodes in order to form the given Topology.