Broadcast variants
Real-world broadcast has three flavors. Room broadcast: send to everyone in a room. Room broadcast excluding sender: avoid echoing back to the user who sent the message. Direct message to a specific user: requires you to also track user_id → WebSocket. Implement all three on your manager and you cover most needs.
Server-initiated push
For periodic updates (price ticker, system metrics, heartbeat broadcast), spin a background task in lifespan startup. Any task that calls manager.broadcast() can run independently of any client request. The task lives for the life of the application.