Why a class, not just a dict
The minimal manager from Track 3 was a dict of sets. Real applications need three more dimensions: per-connection metadata (when did they connect, from what IP, with what session?), per-user lookups (which connection belongs to user X right now?), and observability (how many connections, by room, by user, by version?). A class consolidates all of this without scattering state across modules.
The three indexes
You almost always want three lookup directions: room → set of connections, user_id → connection, connection → metadata. Three small dicts; every operation updates all three coherently. Skipping one of the three is the source of every "stale connection" bug in production.