This is out of scope but here is some glue:

1. every socket connected is per user

2. you need smth another that would share a state between socktets.

It may be a module-level variable or add your users to redis pubsub (like django-channels does).

You can follow this repo where I continue researching this approach: https://github.com/alex-oleshkevich/asgi_cable

It is heavily WIP but you can get some insights.