Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Lab 11: Networking

Due: 2026-12-08 at 23:59

In this lab, you will write a simple client/server application using both TCP and UDP sockets.

You will learn

  • how to create a simple client that requests web content;
  • how to create a simple server that listens and responds to requests; and
  • the differences between TCP and UDP sockets.

Preliminaries

First, find your partner. Click on the assignment link. One partner should create a new team. The second partner should click the link and choose the appropriate team. (Please don’t choose the wrong team, there’s a maximum of two people and if you join the wrong one, you’ll prevent the correct person from joining.) The team name can be the same as what you used in previous labs.

Once you have accepted the assignment and created/joined a team, you can clone the repository and begin working.

Compiler warnings and errors

Make sure your code compiles and passes clippy without errors or warnings. That is, running

$ cargo clean
$ cargo build
$ cargo clippy

should build your program without errors or warnings.

Formatting

Your code must be formatted by running cargo fmt.