The following program demonstrates how to create simple TCP echo server and client.
To run, the server, enter cargo run --bin server; to run the client, enter cargo run --bin client.
This zip file contains the complete crate.