/// Create a new TCP stream connected to the specified address.
///
/// This function will create a new TCP socket and attempt to connect it to
/// the `addr` provided. The returned future will be resolved once the
/// stream has successfully connected, or it wil return an error if one
/// occurs.
Create a new TCP stream connected to the specified address.
This function will create a new TCP socket and attempt to connect it to
the `addr` provided. The returned future will be resolved once the
stream has successfully connected, or it wil return an error if one
occurs.
Create a new TCP stream connected to the specified address . This function will create a new TCP socket and attempt to connect it to the ` addr ` provided . The returned future will be resolved once the stream has successfully connected or it wil return an error if one occurs .
pub fn connect(addr: &SocketAddr) -> ConnectFuture {
        let inner = match mio::net::TcpStream::connect(addr) {
            Ok(tcp) => TcpStream::new(tcp, &Handle::default()),
            Err(e) => ConnectFutureState::Error(e),
        };
        ConnectFuture { inner: inner }
    }
pub fn connect ( addr : & SocketAddr ) -> ConnectFuture { let inner = match mio :: net :: TcpStream :: connect ( addr ) { Ok ( tcp ) => TcpStream :: new ( tcp , & Handle :: default ( ) ) , Err ( e ) => ConnectFutureState :: Error ( e ) , } ; ConnectFuture { inner : inner } }
Create a new TCP stream connected to the specified address.
Create a new TCP stream connected to the specified address .
addr
&SocketAddr