Module net

Source
Available on (crate features native-tls or rustls) and (crate features async-std or tokio) and crate feature tokio only.
Expand description

Types used for networking (tokio implementation)

Macros§

stream_impl 🔒
Provide a set of network stream wrappers for a single stream type.

Structs§

IncomingTcpStreams
Asynchronous stream that yields incoming connections from a Tcp Listener.
IncomingUnixStreams
Asynchronous stream that yields incoming connections from a Unix Listener.
TcpListener
Wrap a Tokio Tcp Listener to behave as a futures::io::TcpListener.
TcpStream
Wrapper for Tokio’s Tcp streams, that implements the standard AsyncRead and AsyncWrite.
TokioTcpListener 🔒
A TCP socket server, listening for connections.
TokioTcpStream 🔒
A TCP stream between a local and a remote socket.
TokioUdpSocket 🔒
A UDP socket.
TokioUnixListener 🔒 Unix
A Unix socket which can accept connections from other Unix sockets.
TokioUnixStream 🔒 Unix
A structure representing a connected Unix socket.
UdpSocket
Wrap a Tokio UdpSocket
UnixListener
Wrap a Tokio Unix Listener to behave as a futures::io::TcpListener.
UnixStream
Wrapper for Tokio’s Unix streams, that implements the standard AsyncRead and AsyncWrite.

Functions§

identity_fn_socketaddr 🔒
Wrapper for (not) converting std::net::SocketAddr to itself.
try_cvt_tokio_unix_addr 🔒 Unix
Try to convert a tokio unix::SocketAddr into a crate::SocketAddr.