15
Accepting TCP Traffic with Tokio
In the previous chapter, we managed to get actors running in different threads to send messages to each other. While it is exciting to code the building blocks for async programming, we left that chapter with a not-very-practical application. In this chapter, we will be creating a server with Tokio that listens to TCP traffic on a port. If messages are sent, our TCP server will process the incoming data, perform operations through a series of actors and threads, and then return the updated data to the client.
In this chapter, we will cover the following topics:
- Exploring TCP
- Accepting TCP
- Processing bytes
- Passing TCP to an actor
- Keeping track of orders with actors
- Chaining communication between actors
- Responding ...
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.