[][src]Trait libccp::DatapathOps

pub trait DatapathOps {
    fn send_msg(&mut self, msg: &[u8]);

    fn log(&self, _level: u32, _msg: &str) { ... }
}

Datapath-wide functionality.

struct Dp(std::os::unix::net::UnixDatagram);
impl libccp::DatapathOps for Dp {
    fn send_msg(&mut self, msg: &[u8]) {
        self.0.send(msg).unwrap_or_else(|_| (0));
    }
}

Required methods

fn send_msg(&mut self, msg: &[u8])

How should libccp communicate with the CCP congestion control algorithm? An impl Datapath should contain some IPC strategy, and transmit msg via that.

Loading content...

Provided methods

fn log(&self, _level: u32, _msg: &str)

How should libccp log messages? By default, silently drop them.

Loading content...

Implementors

Loading content...