[][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>>>>;
fn as_raw_fd(&self) -> RawFd; }

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.

fn as_raw_fd(&self) -> RawFd

Extracts the raw file descriptor.

Loading content...

Implementors

Loading content...