Trait webrtc_util::conn::Listener[][src]

pub trait Listener {
    fn accept<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Arc<dyn Conn + Send + Sync>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
fn close<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
fn addr<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<SocketAddr>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: '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

accept waits for and returns the next connection to the listener.

close closes the listener. Any blocked accept operations will be unblocked and return errors.

addr returns the listener’s network address.

Implementors