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:

It is heavily WIP but you can get some insights.