Building a chat server is a great way to learn the Tokio library because a chat server forces you to think about concurrent IO, which is the core purpose of Tokio. Lily demonstrates how you can spawn background tasks to manage independent network streams, and use tokio::select! to concurrently poll tasks which require a shared state. The lessons learned here can be applied generally to all kinds of asynchronous coding challenges in Rust.
From the author of Refactoring to Rust.
Table of contents
- Title: Creating a Chat Server with async Rust and Tokio
- Release date: April 2021
- Publisher(s): Manning Publications
- ISBN: 10000MNLV2021122
You might also like
Programming WebAssembly with Rust
WebAssembly fulfills the long-awaited promise of web technologies: fast code, type-safe at compile time, execution in …
Java Cookbook, 4th Edition
Java continues to grow and evolve, and this cookbook continues to evolve in tandem. With this …
Programming Rust, 2nd Edition
The Rust programming language offers the rare and valuable combination of statically verified memory safety and …
Grokking Algorithms is a friendly take on this core computer science topic. In it, you'll learn …