code: function(consoleService, opts) {
    EventEmitter.call(this);
    this.reqId = 1;
    this.idMap = {};
    this.msgMap = {};
    this.typeMap = {};
    this.clients = {};
    this.sockets = {};
    this.slaveMap = {};
    this.server = null;
    this.callbacks = {};
    this.state = ST_INITED;
    this.whitelist = opts.whitelist;
    this.consoleService = consoleService;
  }
docs: MasterAgent Constructor
  
  @class MasterAgent
  @constructor
  @param {Object} opts construct parameter
  opts.consoleService {Object} consoleService
  opts.id             {String} server id
  opts.type           {String} server type, 'master', 'connector', etc.
  opts.socket         {Object} socket-io object
  opts.reqId          {Number} reqId add by 1
  opts.callbacks      {Object} callbacks
  opts.state          {Number} MasterAgent state
  @api public