"use strict"; import {WebSocketClientModel} from "../Models/WebSocketClientModel.ecma.js"; /** * @typedef {import("../Application/AnP.ecma.js").AnP} AnP */ /** * @class WebSocketsClientsManager * @constructor * @param {!AnP} anp * @param {!string} key * @param {!(Object.|Array.)} inputs * @returns {void} * @access private * @static */ export const WebSocketsClientsManager = (function(){ /** * @constructs WebSocketsClientsManager * @param {!AnP} anp * @param {!string} key * @param {!(Object.|Array.)} inputs * @returns {void} * @access private * @static */ const WebSocketsClientsManager = function(anp, key, inputs){ /** @type {WebSocketsClientsManager} */ const self = this, /** @type {Object. {}; this.add = (key, url) => { clients[key] = new WebSocketClientModel(anp, url); }; this.remove = key => { if(key in clients){ clients[key].close(); delete clients[key]; return true; }; return false; }; this.send = (key, data) => {}; constructor(); }; return WebSocketsClientsManager; })();