export class GatewayConnectionState{connections=new Map;connect(n,e){this.connections.set(n,e),"function"==typeof e.on?e.on("close",()=>{this.connections.delete(n)}):e.addEventListener&&e.addEventListener("close",()=>{this.connections.delete(n)})}isOnline(n){return this.connections.has(n)}getSocket(n){return this.connections.get(n)??null}getOnlineDids(){return Array.from(this.connections.keys())}}