code: function(session) {
    EventEmitter.call(this);
    clone(session, this, FRONTEND_SESSION_FIELDS);
    // deep copy for settings
    this.settings = dclone(session.settings);
    this.__session__ = session;
  }
docs: Frontend session for frontend server.