Expand description
Contains implementation of a Session
message protocol.
§What is Session
protocol?
Session
protocol is a simple protocol for unreliable networks that implements
basic TCP-like features, such as segmentation, retransmission and acknowledgement.
The goal of this protocol is to establish a read-write session between two parties, where one is a message sender and the other one is the receiver. The messages are called frames which are split and are delivered as segments from the sender to the recipient. The session has some reliability guarantees given by the retransmission and acknowledgement capabilities of individual segments.
§Overview of the module
Modules§
- errors
- Contains errors thrown from this module.
- protocol
Session
protocol messages- state
Session
protocol state machine
Structs§
- Frame
- Data frame of arbitrary length. The frame can be segmented into segments and reassembled back via FrameReassembler.
- Frame
Info - Contains information about a frame that being built. The instances are totally ordered as most recently used first.
- Frame
Reassembler - Represents a frame reassembler.
- Segment
- Represents a frame segment. Besides the data, a segment carries information about the total number of segments in the original frame, its index within the frame and ID of that frame.
- Segment
Id - Convenience type that identifies a segment within a frame.