pub trait TransportListener:
Send
+ Sync
+ 'static {
// Required methods
fn accept<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(Box<dyn MeshStream>, SocketAddr), MeshError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn local_addr(&self) -> Result<SocketAddr, MeshError>;
}Expand description
Listens for incoming mesh connections.
Required Methods§
Sourcefn accept<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(Box<dyn MeshStream>, SocketAddr), MeshError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn accept<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(Box<dyn MeshStream>, SocketAddr), MeshError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Accept the next incoming connection.
Sourcefn local_addr(&self) -> Result<SocketAddr, MeshError>
fn local_addr(&self) -> Result<SocketAddr, MeshError>
Get the local address this listener is bound to.