[][src]Struct cap_async_std::net::TcpListener

pub struct TcpListener { /* fields omitted */ }

A TCP socket server, listening for connections.

This corresponds to async_std::net::TcpListener.

Note that this TcpListener has no bind method. To bind it to a socket address, you must first obtain a Catalog permitting the address, and then call Catalog::bind_tcp_listener.

Implementations

impl TcpListener[src]

pub fn from_std(std: TcpListener) -> Self[src]

Constructs a new instance of Self from the given async_std::net::TcpListener.

pub fn local_addr(&self) -> Result<SocketAddr>[src]

Returns the local socket address of this listener.

This corresponds to async_std::net::TcpListener::local_addr.

pub async fn accept<'_>(&'_ self) -> Result<(TcpStream, SocketAddr)>[src]

Accept a new incoming connection from this listener.

This corresponds to async_std::net::TcpListener::accept.

pub fn incoming(&self) -> Incoming<'_>[src]

Returns an iterator over the connections being received on this listener.

This corresponds to async_std::net::TcpListener::incoming.

Trait Implementations

impl AsRawFd for TcpListener[src]

impl FromRawFd for TcpListener[src]

impl IntoRawFd for TcpListener[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SetTimes for T where
    T: AsRawFd

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.