code: function onDISCONNECT(self, reason, code, desc, lang) { // Client/Server
    if (code !== DISCONNECT_REASON.BY_APPLICATION) {
      var err = new Error(desc || reason);
      err.code = code;
      self.emit('error', err);
    }
    self.reset();
  }
docs: Shared incoming/parser functions