Skip to main content

Module net

Module net 

Source
Expand description

Async networking: TCP listener, TCP stream, UDP socket.

§Traits

  • AsyncRead — poll-based non-blocking read
  • AsyncWrite — poll-based non-blocking write + flush + shutdown

§Types

  • TcpListener — accepts incoming TCP connections
  • TcpStream — bidirectional async byte stream
  • UdpSocket — connectionless async datagram socket

Re-exports§

pub use tcp_listener::TcpListener;
pub use tcp_stream::TcpStream;
pub use udp_socket::UdpSocket;

Modules§

sockaddr
Shared sockaddr conversion utilities for TCP and UDP.
tcp_listener
Async TcpListener — non-blocking TCP accept loop.
tcp_stream
Async TcpStream — non-blocking bidirectional TCP byte stream.
udp_socket
Async UdpSocket — non-blocking UDP datagram socket.

Traits§

AsyncRead
Async version of std::io::Read.
AsyncWrite
Async version of std::io::Write.