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

Re-exports

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

Modules

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 ProtocolHandlers.

Structs

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

The central object responsible for handling all the connections.

The node’s configuration.

Contains statistics related to the node.

Contains statistics related to a single peer.

Enums

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

Traits

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

Functions

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