⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

CongestionController

Trait CongestionController 

Source
pub trait CongestionController: Send + Sync {
    // Required methods
    fn on_ack(&mut self, bytes_acked: u32, rtt_us: u64);
    fn on_duplicate_ack(&mut self);
    fn on_timeout(&mut self);
    fn congestion_window(&self) -> u32;
    fn slow_start_threshold(&self) -> u32;
}
Expand description

Congestion controller trait

Provides a pluggable interface for congestion control algorithms. The default implementation is TCP Reno (RenoController).

Required Methods§

Source

fn on_ack(&mut self, bytes_acked: u32, rtt_us: u64)

Called when new data is acknowledged.

bytes_acked: number of newly acknowledged bytes rtt_us: measured round-trip time in microseconds (0 if unavailable)

Source

fn on_duplicate_ack(&mut self)

Called when a duplicate ACK is received.

Source

fn on_timeout(&mut self)

Called when a retransmission timeout fires.

Source

fn congestion_window(&self) -> u32

Returns the current congestion window in bytes.

Source

fn slow_start_threshold(&self) -> u32

Returns the current slow-start threshold in bytes.

Implementors§