pub trait TcpListener: Debug + Send {
// Required methods
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;
}
Expand description
A TcpListener for this Runtime
Required Methods§
Sourcefn local_addr(&self) -> Result<SocketAddr>
fn local_addr(&self) -> Result<SocketAddr>
Get the address the listener is listening on.