hopr_network_types/session/mod.rs
1//! Contains implementation of a `Session` message protocol.
2//!
3//! # What is `Session` protocol?
4//! `Session` protocol is a simple protocol for unreliable networks that implements
5//! basic TCP-like features, such as segmentation, retransmission and acknowledgement.
6//!
7//! The goal of this protocol is to establish a read-write session between two parties,
8//! where one is a message sender and the other one is the receiver. The messages are called
9//! *frames* which are split and are delivered as *segments* from the sender to the recipient.
10//! The session has some reliability guarantees given by the retransmission and acknowledgement
11//! capabilities of individual segments.
12//!
13//! # Overview of the module
14//! - Protocol messages are defined in the [`protocol`] submodule.
15//! - Protocol state machine is defined in the [`state`] submodule.
16//! - Frames, segmentation and reassembly are defined in the `frame` submodule.
17//!
18
19//! Contains errors thrown from this module.
20pub mod errors;
21mod frame;
22pub mod protocol;
23pub mod state;
24mod utils;
25
26pub use frame::{Frame, FrameId, FrameInfo, FrameReassembler, Segment, SegmentId};
27
28#[cfg(feature = "testing")]
29pub use utils::{FaultyNetwork, FaultyNetworkConfig};