This chapter implements making HTTP requests multiple times, stripping away a layer of abstraction each time. We start by using a user-friendly library, then boil that away until we’re left with manipulating raw TCP packets. Impress your friends your ability to distinguish an IP address from a MAC address. And learn why we went straight from IPv4 to IPv6.
You’ll also be learning lots of Rust in this chapter, most of it related to advanced error handling techniques which become essential for incorporating upstream crates. Several pages are devoted to error handling. This includes a through introduction to trait objects.
Networking is a difficult subject to cover in a single chapter. Each layer is a fractal of complexity. Networking experts will hopefully be kind of my lack of depth in my treatment of their topic of interest!
Figure 8.1 provides an overview of the topics that the chapter covers. Some of the projects that we cover include implementing DNS resolution, generating standards-compliant MAC addresses and multiple examples of generating HTTP requests.. A hint of a role-playing game is added for light relief.
Figure 8.1. Networking chapter map. The chapter incorporates a healthy mix of theory and practical exercises.