tokio-rs / website

Website for the Tokio project
https://tokio.rs
MIT License
229 stars 329 forks source link

share values between connections #668

Closed qidu closed 2 years ago

qidu commented 2 years ago

We can now get and set values, but there is a problem: The values are not shared between connections. If another socket connects and tries to GET the hello key, it will not find anything. You can find the full code here.

As mentioned in the tutorial article, maybe we show how to share values between connections in full code

Darksonn commented 2 years ago

We have a different directory called shared-state that already contains an example of this.

qidu commented 2 years ago

We have a different directory called shared-state that already contains an example of this.

I see, thanks!