/// Connect to a given Arrow Service.
Connect to a given Arrow Service.
Connect to a given Arrow Service .
fn connect<L: Logger + Clone, Q: Sender<Command>>(
    logger: L,
    ssl_context: &SslContext,
    cmd_sender: Q,
    addr: &str,
    arrow_mac: &MacAddr,
    app_context: Shared<AppContext>) -> Result<String, ArrowError> {
    let addr = try!(net::utils::get_socket_address(addr)
        .or(Err(ArrowError::connection_error(format!(
            "failed to lookup Arrow Service {} address information", addr)))));
    match ArrowClient::new(logger, ssl_context, cmd_sender,
        &addr, arrow_mac, app_context) {
        Err(err) => Err(ArrowError::connection_error(format!(
            "unable to connect to remote Arrow Service {} ({})",
            addr, err.description()))),
        Ok(mut client) => client.event_loop()
    }
}
fn connect < L : Logger + Clone , Q : Sender < Command > > ( logger : L , ssl_context : & SslContext , cmd_sender : Q , addr : & str , arrow_mac : & MacAddr , app_context : Shared < AppContext > ) -> Result < String , ArrowError > { let addr = try ! ( net utils get_socket_address ( addr ) or ( Err ( ArrowError connection_error ( format ( " " addr ) ) ) ) ) ; match ArrowClient :: new ( logger , ssl_context , cmd_sender , & addr , arrow_mac , app_context ) { Err ( err ) => Err ( ArrowError :: connection_error ( format ! ( " " addr err description ( ) ) ) ) , Ok ( mut client ) => client . event_loop ( ) } }
Connect to a given Arrow Service.
Connect to a given Arrow Service .
logger
L
ssl_context
&SslContext
cmd_sender
Q
addr
&str
arrow_mac
&MacAddr
app_context
Shared<AppContext>