mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-12-30 16:40:52 +00:00
- Added `DEFAULT_ADDR` constant to `chat.rs` and `echo-tcp.rs` for better maintainability. - Enhanced error logging in `connect-tcp.rs` and `echo-tcp.rs` to include connection addresses. - Improved peer management in `chat.rs` by automatically cleaning up disconnected peers.
Examples of how to use Tokio
This directory contains a number of examples showcasing various capabilities of
the tokio crate.
All examples can be executed with:
cargo run --example $name
A good starting point for the examples would be hello_world
and echo-tcp. Additionally the tokio website contains
additional guides for some of the examples.
For a larger "real world" example, see the mini-redis repository.
If you've got an example you'd like to see here, please feel free to open an issue. Otherwise if you've got an example you'd like to add, please feel free to make a PR!