Struct mtcp_rs::TcpListener

source ·
pub struct TcpListener { /* private fields */ }
Expand description

A TCP socket server, listening for connections, akin to std::net::TcpListener

All I/O operations provided by mtcp_rs::TcpListener are “blocking”, but – unlike the std::net implementation – proper timeout and cancellation support is available. The mtcp_rs::TcpListener is tied to an mtcp_rs::TcpManager instance.

If the timeout parameter was set to Some(Duration) and if the I/O operation does not complete before the specified timeout period expires, then the pending I/O operation will be aborted and fail with an TcpError::TimedOut error.

Implementations§

Trait Implementations§

Formats the value using the given formatter. Read more
Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.