pub struct FlexFecDecoderConfig {
pub repair_window: Duration,
pub max_source_packets: usize,
pub max_repair_packets: usize,
}Expand description
Bounds on what a FlexFecDecoder keeps, all of them derived from the repair window the
session agreed to (RFC 8627 sections 1.1.2 and 9).
Fields§
§repair_window: DurationHow long a source or repair packet is kept after it arrived: the repair-window
parameter. A repair packet and the sources it protects are at most this far apart.
max_source_packets: usizeThe most source packets kept per source stream, whatever the window. Also the largest span of sequence numbers a repair packet may cover: one whose L and D (or mask) reach further cannot be within the repair window and is ignored (section 4.2.2.2).
max_repair_packets: usizeThe most repair packets kept while they wait for sources. The source packets they name
are bounded too, at 16 times max_source_packets over all of them: the oldest repair
packets go first.
Implementations§
Source§impl FlexFecDecoderConfig
impl FlexFecDecoderConfig
Sourcepub const ASSUMED_PACKET_RATE: u32 = 1000
pub const ASSUMED_PACKET_RATE: u32 = 1000
Packets per second the packet-count bounds assume when turning the repair window into a buffer size.
Sourcepub const MIN_SOURCE_PACKETS: usize = 128
pub const MIN_SOURCE_PACKETS: usize = 128
The floor and the ceiling of max_source_packets as derived
from a repair window: a short window still holds one full mask, and no window makes a
peer’s parameters allocate without bound (section 9).
Sourcepub const MAX_SOURCE_PACKETS: usize = 4096
pub const MAX_SOURCE_PACKETS: usize = 4096
See MIN_SOURCE_PACKETS.
Sourcepub fn for_repair_window(repair_window: Duration) -> Self
pub fn for_repair_window(repair_window: Duration) -> Self
The bounds for a session whose repair window is repair_window.
Sourcepub fn for_parameters(parameters: &FlexFecParameters) -> Self
pub fn for_parameters(parameters: &FlexFecParameters) -> Self
The bounds for a session described by parameters (its a=fmtp line).