Struct cap_std::net::TcpListener [−][src]
A TCP socket server, listening for connections.
This corresponds to 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 std::net::TcpListener.
Safety
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 std::net::TcpListener::local_addr.
pub fn try_clone(&self) -> Result<Self>[src]
Creates a new independently owned handle to the underlying socket.
This corresponds to std::net::TcpListener::try_clone.
pub fn accept(&self) -> Result<(TcpStream, SocketAddr)>[src]
Accept a new incoming connection from this listener.
This corresponds to std::net::TcpListener::accept.
pub fn incoming(&self) -> Incoming<'_>ⓘ[src]
Returns an iterator over the connections being received on this listener.
This corresponds to std::net::TcpListener::incoming.
pub fn set_ttl(&self, ttl: u32) -> Result<()>[src]
Sets the value for the IP_TTL option on this socket.
This corresponds to std::net::TcpListener::set_ttl.
pub fn ttl(&self) -> Result<u32>[src]
Gets the value of the IP_TTL option for this socket.
This corresponds to std::net::TcpListener::ttl.
pub fn take_error(&self) -> Result<Option<Error>>[src]
Gets the value of the SO_ERROR option on this socket.
This corresponds to std::net::TcpListener::take_error.
pub fn set_nonblocking(&self, nonblocking: bool) -> Result<()>[src]
Moves this TCP stream into or out of nonblocking mode.
This corresponds to std::net::TcpListener::set_nonblocking.
Trait Implementations
impl AsRawSocket for TcpListener[src]
fn as_raw_socket(&self) -> RawSocket[src]
impl Debug for TcpListener[src]
impl FromRawSocket for TcpListener[src]
unsafe fn from_raw_socket(socket: RawSocket) -> Self[src]
impl IntoRawSocket for TcpListener[src]
fn into_raw_socket(self) -> RawSocket[src]
Auto Trait Implementations
impl RefUnwindSafe for TcpListener[src]
impl Send for TcpListener[src]
impl Sync for TcpListener[src]
impl Unpin for TcpListener[src]
impl UnwindSafe for TcpListener[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> AsUnsafeSocket for T where
T: AsRawSocket, [src]
T: AsRawSocket,
pub fn as_unsafe_socket(&self) -> UnsafeSocket[src]
pub fn as_tcp_stream_view(&self) -> View<'_, TcpStream>[src]
pub unsafe fn as_unscoped_tcp_stream_view(&self) -> View<'static, TcpStream>[src]
pub fn as_tcp_listener_view(&self) -> View<'_, TcpListener>[src]
pub unsafe fn as_unscoped_tcp_listener_view(&self) -> View<'static, TcpListener>[src]
pub fn as_udp_socket_view(&self) -> View<'_, UdpSocket>[src]
pub unsafe fn as_unscoped_udp_socket_view(&self) -> View<'static, UdpSocket>[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T> FromUnsafeSocket for T where
T: FromRawSocket, [src]
T: FromRawSocket,
pub unsafe fn from_unsafe_socket(unsafe_socket: UnsafeSocket) -> T[src]
pub fn from_socketlike<IUS>(into_unsafe_socket: IUS) -> Self where
IUS: IntoUnsafeSocket, [src]
IUS: IntoUnsafeSocket,
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> IntoUnsafeSocket for T where
T: IntoRawSocket, [src]
T: IntoRawSocket,
pub fn into_unsafe_socket(self) -> UnsafeSocket[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,