Network Programming with Rust
上QQ阅读APP看书,第一时间看更新

What this book covers

Chapter 1, Introduction to Client/Server Networking, starts the book with a gentle introduction to computer networking from the ground up. This includes IP addressing, TCP/UDP, and DNS. This forms the basis of our discussions in later chapters.

Chapter 2, Introduction to Rust and its Ecosystem, contains an introduction to Rust. This is an overall introduction that should be good enough to get the reader started. We do assume some familiarity with programming.

Chapter 3, TCP and UDP Using Rust, dives into using Rust for networking. We start with basic socket programming using the standard library. We then look at some crates from the ecosystem that can be used for network programming.

Chapter 4, Data Serialization, Deserialization, and Parsing, explains that an important aspect of networked computing is handling data. This chapter is an introduction to serializing and deserializing data using Serde. We also look at parsing using nom and other frameworks.

Chapter 5, Application Layer Protocols, moves up a layer to look at protocols that operate above TCP/IP. We look at a few crates to work with, such as RPC, SMTP, FTP, and TFTP.

Chapter 6, Talking HTTP in the Internet, explains that arguably the most common application of the internet is HTTP. We look at crates such as Hyper and Rocket which are used for writing HTTP servers and clients.

Chapter 7, Asynchronous Network Programming Using Tokio, looks at the Tokio stack for asynchronous programming using futures, streams, and event loops.

Chapter 8, Security, delves into securing the services we have described so far. This is using certificates and secret keys.

Chapter 9Appendix, discusses a number of crates have appeared that propose alternate ways of doing things already covered in this book. This includes the async/await syntax, parsing using Pest, and so on. We will discuss some of these in the appendix.