pub trait IPeer: Sync + Send {
fn addr(&self) -> SocketAddr;
fn is_disconnect<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn send_message<'life0, 'async_trait>(
&'life0 self,
message: Message
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn send<'life0, 'async_trait>(
&'life0 self,
buff: Vec<u8>
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn send_all<'life0, 'async_trait>(
&'life0 self,
buff: Vec<u8>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn send_ref<'life0, 'life1, 'async_trait>(
&'life0 self,
buff: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn send_all_ref<'life0, 'life1, 'async_trait>(
&'life0 self,
buff: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn flush<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn disconnect<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
}