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/// Contains errors thrown from this module.
19pub mod errors;
20mod frame;
21pub mod protocol;
22pub mod state;
23mod utils;
24
25pub use frame::{Frame, FrameId, FrameInfo, FrameReassembler, Segment, SegmentId};