[][src]Trait runtime_raw::TcpListener

pub trait TcpListener: Debug + Send {
    fn local_addr(&self) -> Result<SocketAddr>;
fn poll_accept(
        self: Pin<&mut Self>,
        cx: &mut Context
    ) -> Poll<Result<Pin<Box<dyn TcpStream>>>>; }

A TcpListener for this Runtime

Required methods

fn local_addr(&self) -> Result<SocketAddr>

Get the address the listener is listening on.

fn poll_accept(
    self: Pin<&mut Self>,
    cx: &mut Context
) -> Poll<Result<Pin<Box<dyn TcpStream>>>>

Check if the listener is ready to accept connections.

Loading content...

Implementors

Loading content...