[][src]Trait portus::Flow

pub trait Flow {
    fn on_report(&mut self, sock_id: u32, m: Report);

    fn close(&mut self) { ... }
}

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

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.

Loading content...

Provided methods

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.

Loading content...

Implementations on Foreign Types

impl<T: ?Sized> Flow for Box<T> where
    T: Flow
[src]

Loading content...

Implementors

Loading content...