"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.GatewayConnectionState=void 0;class GatewayConnectionState{connections=new Map;connect(e,n){this.connections.set(e,n),"function"==typeof n.on?n.on("close",()=>{this.connections.delete(e)}):n.addEventListener&&n.addEventListener("close",()=>{this.connections.delete(e)})}isOnline(e){return this.connections.has(e)}getSocket(e){return this.connections.get(e)??null}getOnlineDids(){return Array.from(this.connections.keys())}}exports.GatewayConnectionState=GatewayConnectionState;