code: function(agent, id, type, pid, info, socket) {
    let record = {
      id: id,
      type: type,
      pid: pid,
      info: info,
      socket: socket
    };
    if (type === 'client') {
      agent.clients[id] = record;
    } else {
      if (!agent.idMap[id]) {
        agent.idMap[id] = record;
        let list = agent.typeMap[type] = agent.typeMap[type] || [];
        list.push(record);
      } else {
        let slaves = agent.slaveMap[id] = agent.slaveMap[id] || [];
        slaves.push(record);
      }
    }
    return record;
  }
docs: add monitor,client to connection -- idMap
  
  @param {Object} agent agent object
  @param {String} id
  @param {String} type serverType
  @param {Object} socket socket-io object
  @api private