Struct aggligator_util::transport::tcp::TcpAcceptor
source · pub struct TcpAcceptor { /* private fields */ }Available on crate feature
tcp only.Expand description
TCP transport for incoming connections.
Implementations§
source§impl TcpAcceptor
impl TcpAcceptor
sourcepub async fn new(addrs: impl IntoIterator<Item = SocketAddr>) -> Result<Self>
pub async fn new(addrs: impl IntoIterator<Item = SocketAddr>) -> Result<Self>
Create a new TCP transport for incoming connections.
It listens on the local addresses specified in addrs.
Trait Implementations§
source§impl AcceptingTransport for TcpAcceptor
impl AcceptingTransport for TcpAcceptor
source§fn listen<'life0, 'async_trait>(
&'life0 self,
tx: Sender<AcceptedIoBox>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn listen<'life0, 'async_trait>(
&'life0 self,
tx: Sender<AcceptedIoBox>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Accepts incoming connections. Read more
source§fn link_filter<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_new: &'life1 Link<LinkTagBox>,
_existing: &'life2 [Link<LinkTagBox>]
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn link_filter<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_new: &'life1 Link<LinkTagBox>,
_existing: &'life2 [Link<LinkTagBox>]
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Checks whether a new link can be added given existing links.