Setting up our TCP client and server
To explore sending and processing bytes over TCP, we will create a basic echo server and client. We will be dropping any complex logic that we built in the previous chapter because we do not need the distraction of the complex logic when trying to explore the ideas around sending, receiving, and processing bytes.
In a new directory, we should have two cargo projects – one for the server and another for the client. They can take the following file structure:
├── client │ ├── Cargo.toml │ └── src │ └── main.rs └── server ├── Cargo.toml └── src └── main.rs
Both projects will be using...