16
Building Protocols on Top of TCP
In the previous chapter, we used the Tokio framework to support an async actor model. Our Tokio framework accepted basic traffic and then sent those messages to actors once the messages were processed. However, our TCP processing was basic. You should not be comfortable building complex systems on this basic TCP process if this book is the only exposure you have had to TCP. In this chapter, we will completely focus on how to package, send, and read data over a TCP connection.
In this chapter, we will cover the following topics:
- Setting up a TCP client and echo server
- Processing bytes over TCP using structs
- Creating frames to separate messages over TCP
- Building an HTTP frame on top of TCP
By the end of this ...
Get Rust Web Programming - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.