Trait webrtc_util::conn::Listener
source · pub trait Listener {
// Required methods
fn accept<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(Arc<dyn Conn + Send + Sync>, SocketAddr)>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn close<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn addr<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<SocketAddr>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
A Listener is a generic network listener for connection-oriented protocols. Multiple connections may invoke methods on a Listener simultaneously.
Required Methods§
sourcefn accept<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(Arc<dyn Conn + Send + Sync>, SocketAddr)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn accept<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(Arc<dyn Conn + Send + Sync>, SocketAddr)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
accept waits for and returns the next connection to the listener.