Function portus::run[][src]

pub fn run<I, U>(
    backend_builder: BackendBuilder<I>,
    cfg: &Config<I, U>
) -> Result<!> where
    I: Ipc,
    U: CongAlg<I>, 

Main execution loop of CCP for the static pipeline use case. The run method blocks 'forever'; it only returns in two cases:

  1. The IPC socket is closed.
  2. An invalid message is received.

Callers must construct a BackendBuilder and a Config. Algorithm implementations should

  1. Initializes an ipc backendbuilder (depending on the datapath).
  2. Calls run(), or spawn()passing the BackendBuilder b and a Config with optional logger and command line argument structure. Run() or spawn() create arc objects, which are passed into run_inner to build the backend, so spawn() can create a CCPHandle that references this boolean to kill the thread.