[][src]Struct libccp::Connection

pub struct Connection<T: CongestionOps + 'static>(_, _, _);

Methods

impl<T: CongestionOps + 'static> Connection<T>[src]

pub fn start(
    token: &Datapath,
    conn: T,
    flow_info: FlowInfo
) -> Result<Self, Error>
[src]

Call this function when a connection starts. conn: impl CongestionOps represents per-connection state, and how to mutate it in response to changing congestion windows or rates. You must call init_with_datapath before this. To enforce this, you must pass in a token, DatapathInitialized, which only that function can give you.

pub fn load_primitives(&mut self, prims: Primitives)[src]

Inform libccp of new measurements.

pub fn primitives(&self) -> Primitives[src]

pub fn invoke(&mut self) -> Result<(), Error>[src]

Tell libccp to invoke. This will run the congestion control's datapath program, and potentially result in calls to the CongestionOps callbacks. Therefore, ensure that when you call this function, you are not holding locks that the CongestionOps functionality tries to acquire - this will deadlock.

Trait Implementations

impl<T: CongestionOps> Drop for Connection<T>[src]

impl<T: CongestionOps> DerefMut for Connection<T>[src]

impl<T: CongestionOps> Deref for Connection<T>[src]

type Target = T

The resulting type after dereferencing.

Auto Trait Implementations

impl<T> !Send for Connection<T>

impl<T> !Sync for Connection<T>

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

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