UNPKG

homebridge-config-ui-x

Version:

A web based management, configuration and control platform for Homebridge

21 lines (20 loc) 593 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); class SocketsContainer { constructor() { this.socketEventHosts = new Map(); } getAllSocketEventHosts() { return this.socketEventHosts; } getSocketEventsHostByPort(port) { return this.socketEventHosts.get(`${port}`); } addSocketEventsHost(namespace, port, host) { this.socketEventHosts.set(namespace ? `${namespace}:${port}` : `${port}`, host); } clear() { this.socketEventHosts.clear(); } } exports.SocketsContainer = SocketsContainer;