1 unstable release
| 0.1.0 | Jul 26, 2025 |
|---|
#1 in #connection-management
Used in 3 crates
9KB
144 lines
This module provides utilities for working with TCP sockets in an asynchronous context using Tokio. It handles sending and receiving size-prefixed messages and packets with client IDs. The module ensures cancellation safety where applicable, allowing for robust handling of asynchronous operations.
If you call ANYTHING from this module, make SURE to read the notes about cancellation safety in each doc comment. If you don't, you will be cursed and your code will be haunted by the ghosts of the braincells who had to die in the tens of hours of work debugging and testing this code to make sure it's cancellation safe where needed.
If you want to touch this, read up on cancellation safety in Rust and the Tokio documentation, first. Then, grab a {drink_of_choice}, block a time slot of a few hours, and enjoy yourself. Finally, make sure you can explain why the code is the way it is before you change it. And please, don't assume that it was ever correct; so if you find a bug, it's probably real.
Dependencies
~4–15MB
~118K SLoC