(c: WsConnection, sid: string)
| 36 | |
| 37 | private readonly _bySession = new Map<string, Set<WsConnection>>(); |
| 38 | subscribe(c: WsConnection, sid: string): void { |
| 39 | let set = this._bySession.get(sid); |
| 40 | if (!set) { |
| 41 | set = new Set(); |
| 42 | this._bySession.set(sid, set); |
| 43 | } |
| 44 | set.add(c); |
| 45 | } |
| 46 | unsubscribe(c: WsConnection, sid: string): void { |
| 47 | this._bySession.get(sid)?.delete(c); |
| 48 | } |
no test coverage detected