pub fn rtr_listener(
    history: OriginsHistory,
    config: &Config,
) -> (NotifySender, impl Future<Item=(), Error=()>) {
    let session = session_id();
    let (dispatch, dispatch_fut) = Dispatch::new();
    let timing = Timing::new(config);
    let fut = dispatch_fut.select(
        future::select_all(
            config.tcp_listen.iter().map(|addr| {
                single_listener(
                    *addr, session, history.clone(),
                    dispatch.clone(), timing
                )
            })
        ).then(|_| Ok(()))
    ).then(|_| Ok(()));
    (dispatch.get_sender(), fut)
}
/// Returns a future for the RTR server.
///
/// The server will be configured according to `config` including creating
/// listener sockets for all the listen addresses mentioned.
/// The data exchanged with the clients is taken from `history`.
///
/// In order to be able to send notifications, the function also creates a
/// channel. It returns the sending half of that channel together with the
/// future.
Returns a future for the RTR server.
The server will be configured according to `config` including creating
listener sockets for all the listen addresses mentioned.
The data exchanged with the clients is taken from `history`.

In order to be able to send notifications, the function also creates a
channel. It returns the sending half of that channel together with the
future.
Returns a future for the RTR server . The server will be configured according to ` config ` including creating listener sockets for all the listen addresses mentioned . The data exchanged with the clients is taken from ` history ` . In order to be able to send notifications the function also creates a channel . It returns the sending half of that channel together with the future .
pub fn rtr_listener(
    history: OriginsHistory,
    config: &Config,
) -> (NotifySender, impl Future<Item=(), Error=()>) {
    let session = session_id();
    let (dispatch, dispatch_fut) = Dispatch::new();
    let timing = Timing::new(config);
    let fut = dispatch_fut.select(
        future::select_all(
            config.tcp_listen.iter().map(|addr| {
                single_listener(
                    *addr, session, history.clone(),
                    dispatch.clone(), timing
                )
            })
        ).then(|_| Ok(()))
    ).then(|_| Ok(()));
    (dispatch.get_sender(), fut)
}
pub fn rtr_listener ( history : OriginsHistory , config : & Config , ) -> ( NotifySender , impl Future < Item = ( ) , Error = ( ) > ) { let session = session_id ( ) ; let ( dispatch , dispatch_fut ) = Dispatch :: new ( ) ; let timing = Timing :: new ( config ) ; let fut = dispatch_fut . select ( future :: select_all ( config . tcp_listen . iter ( ) . map ( | addr | { single_listener ( * addr , session , history . clone ( ) , dispatch . clone ( ) , timing ) } ) ) . then ( | _ | Ok ( ( ) ) ) ) . then ( | _ | Ok ( ( ) ) ) ; ( dispatch . get_sender ( ) , fut ) }
Returns a future for the RTR server.
Returns a future for the RTR server .
history
OriginsHistory
config
&Config
history
OriginsHistory
config
&Config