pub async fn connect(
        &mut self,
        addr: impl ToSocketAddrs,
        scope: &Scope<'_>,
    ) -> eyre::Result<()> {
        let stream = TcpStream::connect(addr).await?;
        self.connect_with_stream(stream, scope).await
    }
/// Connects to server at specified address.
/// If connection succeeds, disconnects to previously connected server if any.
Connects to server at specified address.
If connection succeeds, disconnects to previously connected server if any.
Connects to server at specified address . If connection succeeds disconnects to previously connected server if any .
pub async fn connect(
        &mut self,
        addr: impl ToSocketAddrs,
        scope: &Scope<'_>,
    ) -> eyre::Result<()> {
        let stream = TcpStream::connect(addr).await?;
        self.connect_with_stream(stream, scope).await
    }
pub async fn connect ( & mut self , addr : impl ToSocketAddrs , scope : & Scope < ' _ > , ) -> eyre :: Result < ( ) > { let stream = TcpStream :: connect ( addr ) . await ? ; self . connect_with_stream ( stream , scope ) . await }
Connects to server at specified address.
Connects to server at specified address .
&mut self
addr
impl ToSocketAddrs
scope
&Scope<'_>