Crate pea2pea

source ·
Expand description

pea2pea is a simple, low-level, and customizable implementation of a TCP P2P node.

Re-exports

pub use connections::Connection;
pub use connections::ConnectionInfo;
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 dedicated handler objects.

Structs

The node’s configuration. See the source of Config::default for the defaults.
The central object responsible for handling connections.
Contains basic statistics related to a node or a connection.

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.