Available on crate feature
tokio_support only.Expand description
Asynchronous local sockets which work with the Tokio runtime and event loop.
The Tokio integration allows the local socket streams and listeners to be notified by the OS kernel whenever they’re ready to be read from of written to, instead of spawning threads just to put them in a wait state of blocking on the I/O.
Types from this module will not work with other async runtimes, such as async-std or smol, since the Tokio types’ methods will panic whenever they’re called outside of a Tokio runtime context. Open an issue if you’d like to see other runtimes supported as well.
Structs§
- Local
Socket Listener - A Tokio-based local socket server, listening for connections.
- Local
Socket Stream - A Tokio-based local socket byte stream, obtained eiter from
LocalSocketListeneror by connecting to an existing local socket. - Owned
Read Half - An owned read half of a Tokio-based local socket stream, obtained by splitting a
LocalSocketStream. - Owned
Write Half - An owned write half of a Tokio-based local socket stream, obtained by splitting a
LocalSocketStream.