Trait portus::Flow

source ·
pub trait Flow {
    // Required method
    fn on_report(&mut self, sock_id: u32, m: Report);

    // Provided method
    fn close(&mut self) { ... }
}
Expand description

Implement this trait, portus::CongAlg, and portus::CongAlgBuilder to define a CCP congestion control algorithm.

  • CongAlg implements functionality which applies to a given algorithm as a whole
  • Flow implements functionality specific to an individual flow
  • CongAlgBuilder specifies how the trait that implements CongAlg should be built from given command-line arguments.

Required Methods§

source

fn on_report(&mut self, sock_id: u32, m: Report)

This callback specifies the algorithm’s behavior when it receives a report of measurements from the datapath.

Provided Methods§

source

fn close(&mut self)

Optionally specify what the algorithm should do when the flow ends, e.g., clean up any external resources. The default implementation does nothing.

Implementations on Foreign Types§

source§

impl<T> Flow for Box<T>where T: Flow + ?Sized,

source§

fn on_report(&mut self, sock_id: u32, m: Report)

source§

fn close(&mut self)

Implementors§