Struct cap_async_std::net::TcpListener [−][src]
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 unsafe fn from_std(std: TcpListener) -> Self
[src][−]
Constructs a new instance of Self
from the given async_std::net::TcpListener
.
Safety
async_std::net::TcpListener
is not sandboxed and may access any address that the host
process has access to.
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][+]
impl OwnsRaw for TcpListener
[src]
Safety: TcpListener
wraps a net::TcpListener
which owns its handle.
Auto Trait Implementations
impl RefUnwindSafe for TcpListener
impl Send for TcpListener
impl Sync for TcpListener
impl Unpin for TcpListener
impl UnwindSafe for TcpListener
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> AsUnsafeFile for T where
T: OwnsRaw + AsRawFd,
[src][+]
T: OwnsRaw + AsRawFd,
impl<T> AsUnsafeHandle for T where
T: OwnsRaw + AsRawFd,
[src][+]
T: OwnsRaw + AsRawFd,
impl<T> AsUnsafeSocket for T where
T: OwnsRaw + AsRawFd,
[src][+]
T: OwnsRaw + AsRawFd,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T> FromUnsafeFile for T where
T: OwnsRaw + FromRawFd,
[src][+]
T: OwnsRaw + FromRawFd,
impl<T> FromUnsafeSocket for T where
T: OwnsRaw + FromRawFd,
[src][+]
T: OwnsRaw + FromRawFd,
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> IntoUnsafeFile for T where
T: OwnsRaw + IntoRawFd,
[src][+]
T: OwnsRaw + IntoRawFd,
impl<T> IntoUnsafeHandle for T where
T: OwnsRaw + IntoRawFd,
[src][+]
T: OwnsRaw + IntoRawFd,
impl<T> IntoUnsafeSocket for T where
T: OwnsRaw + IntoRawFd,
[src][+]
T: OwnsRaw + IntoRawFd,
impl<T> SetTimes for T where
T: AsRawFd,
[+]
T: AsRawFd,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,