function Client() { /** * @type {string} */ this.id = null; /** * @type {import("websocket").connection} */ this.socket = null; /** * @type {Date} */ this.created_at = null; this.store = new Map(); this.rooms = new Set(); }; /** * @type {Map} */ Client.clients = new Map(); Client.prototype.send = function(obj){ this.socket.sendUTF(JSON.stringify(obj)); }; exports.Client = Client;