/// Create a new ArrowStream instance and register the underlaying socket 
/// within a given event loop.
Create a new ArrowStream instance and register the underlaying socket
within a given event loop.
Create a new ArrowStream instance and register the underlaying socket within a given event loop .
fn connect<S: IntoSsl, H: Handler>(
        s: S, 
        arrow_addr: &SocketAddr,
        token_id: usize,
        event_loop: &mut EventLoop<H>) -> Result<ArrowStream> {
        let tcp_stream = try_io!(TcpStream::connect(arrow_addr));
        let ssl_stream = try_io!(SslStream::connect(s, tcp_stream));
        register_socket(token_id, ssl_stream.get_ref(), 
            true, true, event_loop);
        let res = ArrowStream {
            stream:   ssl_stream,
            state:    ArrowStreamState::Ok,
            token_id: token_id
        };
        Ok(res)
    }
fn connect < S : IntoSsl , H : Handler > ( s : S , arrow_addr : & SocketAddr , token_id : usize , event_loop : & mut EventLoop < H > ) -> Result < ArrowStream > { let tcp_stream = try_io ! ( TcpStream connect ( arrow_addr ) ) ; let ssl_stream = try_io ! ( SslStream connect ( s tcp_stream ) ) ; register_socket ( token_id , ssl_stream . get_ref ( ) , true , true , event_loop ) ; let res = ArrowStream { stream : ssl_stream , state : ArrowStreamState :: Ok , token_id : token_id } ; Ok ( res ) }
Create a new ArrowStream instance and register the underlaying socket
within a given event loop.
Create a new ArrowStream instance and register the underlaying socket within a given event loop .
s
S
arrow_addr
&SocketAddr
token_id
usize
event_loop
&mut EventLoop<H>