Struct mtcp_rs::TcpManager
source · pub struct TcpManager { /* private fields */ }
Expand description
A manager for “shared” resources, used by
mtcp_rs::TcpListener
and
mtcp_rs::TcpStream
The same mtcp_rs::TcpManager
instance can be shared by multiple
mtcp_rs::TcpListener
and mtcp_rs::TcpStream
instances. However, an
mtcp_rs::TcpManager
instance can not be shared across the thread
boundary: Each thread needs to create its own mtcp_rs::TcpManager
instance.
A thread-local singleton instance can be obtained via the
instance()
function.
The canceller()
function can be used to obtain
a new mtcp_rs::TcpCanceller
instance for this
mtcp_rs::TcpManager
.