commonware_runtime

Trait Listener

source
pub trait Listener<Si, St>:
    Sync
    + Send
    + 'static
where Si: Sink, St: Stream,
{ // Required method fn accept( &mut self, ) -> impl Future<Output = Result<(SocketAddr, Si, St), Error>> + Send; }
Expand description

Interface that any runtime must implement to handle incoming network connections.

Required Methods§

source

fn accept( &mut self, ) -> impl Future<Output = Result<(SocketAddr, Si, St), Error>> + Send

Accept an incoming connection.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Listener<Sink, Stream> for commonware_runtime::deterministic::Listener

source§

impl Listener<Sink, Stream> for commonware_runtime::tokio::Listener