Trait libccp::CongestionOps [−][src]
pub trait CongestionOps { fn set_cwnd(&mut self, cwnd: u32); fn set_rate_abs(&mut self, rate: u32); }
Expand description
Implement this trait on the type that holds per-connection state.
struct Cn { curr_cwnd: u32, curr_rate: u32, } impl libccp::CongestionOps for Cn { fn set_cwnd(&mut self, cwnd: u32) { self.curr_cwnd = cwnd; } fn set_rate_abs(&mut self, rate: u32) { self.curr_rate = rate; } }