UNPKG

diffusion

Version:

Diffusion JavaScript client

20 lines (16 loc) 527 B
/** * Defined reason code and message used to report client close conditions. * * @property {Number} id - The closereason's id * @property {String} message - The close reason's description * @property {Boolean} canReconnect - Whether the session can reconnect from this state */ function CloseReason(id, message, canReconnect) { this.id = id; this.message = message; this.canReconnect = canReconnect; this.toString = function() { return "id: " + message; }; } module.exports = CloseReason;