Networking Recipes Overview
masterThe Networking section of the Rust Cookbook provides recipes for common network programming tasks using the standard library (std).
Available recipes include:
TCP/IP
- Listen on an unused TCP/IP port
- Implement a TCP echo server
- Implement a TCP client
- Connect to a TCP address with a timeout
- Set a read timeout on a TCP stream
- Disable Nagle's algorithm (
nodelay) - Half-close a TCP connection
- Perform non-blocking TCP accept
UDP
- Send and receive UDP datagrams
- Join a UDP multicast group
IP Addresses and Hostnames
- Resolve a hostname to socket addresses
- Classify an IP address
- Bind for both IPv4 and IPv6 (dual stack)