Expand description
Network transports and runtime reactor integration for ntex.
This crate provides TCP and Unix domain socket connection helpers, DNS-aware
connectors, and reactor implementations for native ntex, Tokio, and Compio
runtimes. All transports are exposed as [Io] values.
DefaultRuntime selects a reactor from the enabled Cargo features and the
current platform.
§Runtime features
tokioenables the Tokio reactor.compioenables the Compio reactor.neon-pollingrequires the nativepollingreactor on Unix.neon-uringrequires the nativeio-uringreactor on Linux.
Without an explicit runtime feature, Linux tries io-uring and falls back to
polling; other Unix platforms use polling and Windows always uses IOCP.
Modules§
Structs§
- Default
Runtime - The default runtime.
- Listener
- TCP listener that accepts connections through the current reactor.
Traits§
- Reactor
- Runtime reactor used for network connection and transport operations.
Functions§
- from_
tcp_ stream - Converts a standard-library TCP stream into an [
Io] value. - from_
unix_ stream - Converts a standard-library Unix stream into an [
Io] value. - is_
tcp_ listener_ supported - Returns
trueif the current reactor supportstcp_listener. - tcp_
connect - Opens a TCP connection to a remote host.
- tcp_
listener - Registers a TCP listener with the current reactor.
- unix_
connect - Opens a Unix domain socket connection.
- with_
reactor - Sets the current reactor and runs the provided closure.