CongestionOps

Trait CongestionOps 

Source
pub trait CongestionOps {
    // Required methods
    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;
    }
}

Required Methods§

Source

fn set_cwnd(&mut self, cwnd: u32)

Source

fn set_rate_abs(&mut self, rate: u32)

Implementors§