You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
698 B
30 lines
698 B
/**
|
|
* @module flitter-socket/ClientErrorTransaction
|
|
*/
|
|
|
|
const Transaction = require('./Transaction')
|
|
|
|
/**
|
|
* Special transaction type used when a client message
|
|
* has come in, but is invalid.
|
|
* @extends module:flitter-socket/Transaction~Transaction
|
|
*/
|
|
class ClientErrorTransaction extends Transaction {
|
|
|
|
/**
|
|
* Set values on the outgoing data.
|
|
* @param key
|
|
* @param value
|
|
* @returns {ClientErrorTransaction} - for chaining
|
|
*/
|
|
set(key, value = null){
|
|
if ( value && typeof this.outgoing === 'object' ) this.outgoing[key] = value
|
|
else this.outgoing = key
|
|
|
|
return this
|
|
}
|
|
|
|
}
|
|
|
|
module.exports = exports = ClientErrorTransaction
|