pub async fn make_connection_with_addr<'a, A>(
        &'a self,
        id: T,
        addr: &'a A,
    ) -> Result<(), KfSocketError>
    where
        A: ToSocketAddrs + Debug,
    {
        trace!("creating new connection: {:#?}", addr);
        let mut socket_address = addr.to_socket_addrs()?;
        let socket_addr = socket_address.next().unwrap();
        let client = KfSocket::connect(&socket_addr).await?;
        trace!("got connection to server: {:#?}", &id);
        self.insert_socket(id.clone(), client);
        trace!("finish connection to server: {:#?}", &id);
        Ok(())
    }
/// make connection with addres as separate parameter
make connection with addres as separate parameter
make connection with addres as separate parameter
pub async fn make_connection_with_addr<'a, A>(
        &'a self,
        id: T,
        addr: &'a A,
    ) -> Result<(), KfSocketError>
    where
        A: ToSocketAddrs + Debug,
    {
        trace!("creating new connection: {:#?}", addr);
        let mut socket_address = addr.to_socket_addrs()?;
        let socket_addr = socket_address.next().unwrap();
        let client = KfSocket::connect(&socket_addr).await?;
        trace!("got connection to server: {:#?}", &id);
        self.insert_socket(id.clone(), client);
        trace!("finish connection to server: {:#?}", &id);
        Ok(())
    }
pub async fn make_connection_with_addr < ' a , A > ( & ' a self , id : T , addr : & ' a A , ) -> Result < ( ) , KfSocketError > where A : ToSocketAddrs + Debug , { trace ! ( " " addr ) ; let mut socket_address = addr . to_socket_addrs ( ) ? ; let socket_addr = socket_address . next ( ) . unwrap ( ) ; let client = KfSocket :: connect ( & socket_addr ) . await ? ; trace ! ( " " id ) ; self . insert_socket ( id . clone ( ) , client ) ; trace ! ( " " id ) ; Ok ( ( ) ) }
make connection with addres as separate parameter
make connection with addres as separate parameter
&'a self
id
T
addr
&'a A
&'a self
id
T
addr
&'a A