mod copa;
mod noop;
pub use copa::{Copa, CopaConfig};
pub use noop::NoopCc;
use core::time::Duration;
use crate::types::{AckInfo, LostPacket, SentPacket};
pub trait CongestionController {
fn on_packet_sent(&mut self, packet: &SentPacket);
fn on_packet_acked(&mut self, ack: &AckInfo) {
self.on_packets_acked(core::slice::from_ref(ack));
}
fn on_packets_acked(&mut self, acks: &[AckInfo]);
fn on_packet_lost(&mut self, packet: &LostPacket);
fn pacing_rate(&self) -> u64;
fn cwnd(&self) -> u64;
fn rtt(&self) -> Duration;
fn can_send(&self, bytes_in_flight: u64) -> bool;
}