Totodore / socketioxide

A socket.io server implementation in Rust that integrates with the Tower ecosystem and the Tokio stack.
https://docs.rs/socketioxide
MIT License
1.13k stars 48 forks source link

Hold a per `Client` state rather than a static state. #317

Closed Totodore closed 1 month ago

Totodore commented 2 months ago

Currently the global state management is done with a static state. It is convenient because the user can put non clonable data and get a 'static ref from any callback. However this should be completely avoided for the following reasons:

Totodore commented 2 months ago

If someone want to contribute for this issue: