hopr_transport/protocol/mod.rs
1//! Collection of objects and functionality allowing building of p2p or stream protocols for the higher business logic
2//! layers.
3//!
4//! ## Contents
5//!
6//! Supported protocol configurations:
7//!
8//! - `mix`
9//! - `ack`
10//! - `heartbeat`
11
12/// Coder and decoder for the transport binary protocol layer
13mod codec;
14
15/// Per-peer protocol conformance counters.
16pub mod counters;
17
18/// Errors produced by the crate.
19pub mod errors;
20
21// protocols
22/// `heartbeat` p2p protocol
23pub mod heartbeat;
24
25/// Packet pipeline for the HOPR protocol.
26mod pipeline;
27/// Stream processing utilities
28pub mod stream;
29
30/// Sequences re-planning ahead of refilling when a return path goes silent.
31pub mod return_path_recovery;
32/// Records SURB round-trips as network graph edge telemetry.
33pub mod surb_telemetry;
34
35pub use counters::{PeerProtocolCounterRegistry, PeerProtocolCounters};
36pub use pipeline::{
37 AcknowledgementPipelineConfig, NodeType, PacketPipelineBuilder, PacketPipelineConfig, PacketPipelineProcesses,
38 PoolArbitrationConfig, Unset,
39};
40
41const HOPR_PACKET_SIZE: usize = hopr_crypto_packet::prelude::HoprPacket::SIZE;
42
43pub type HoprBinaryCodec = codec::FixedLengthCodec<HOPR_PACKET_SIZE>;
44pub const CURRENT_HOPR_MSG_PROTOCOL: &str = "/hopr/mix/1.1.0";