function HttpConnector(host, config) {
  ConnectionAbstract.call(this, host, config);

  this.hand = handles[this.host.protocol];
  if (!this.hand) {
    throw new TypeError('Invalid protocol "' + this.host.protocol +
      '", expected one of ' + _.keys(handles).join(', '));
  }

  this.useSsl = this.host.protocol === 'https';

  config = _.defaults(config || {}, {
    keepAlive: true,
    minSockets: 10,
    // 10 makes sense but 11 actually keeps 10 sockets around
    // https://github.com/mikeal/forever-agent/issues/8
    maxSockets: 11
  });

  this.agent = this.createAgent(config);
}
/**
 * Connector used to talk to an elasticsearch node via HTTP
 *
 * @param {Host} host - The host object representing the elasticsearch node we will be talking to
 * @param {Object} [config] - Configuration options (extends the configuration options for ConnectionAbstract)
 * @param {Number} [config.concurrency=10] - the maximum number of sockets that will be opened to this node
 */
Connector used to talk to an elasticsearch node via HTTP
@param {Host} host - The host object representing the elasticsearch node we will be talking to
@param {Object} [config] - Configuration options (extends the configuration options for ConnectionAbstract)
@param {Number} [config.concurrency=10] - the maximum number of sockets that will be opened to this node
Connector used to talk to an elasticsearch node via HTTP @param { Host } host - The host object representing the elasticsearch node we will be talking to @param { Object } [ config ] - Configuration options ( extends the configuration options for ConnectionAbstract ) @param { Number } [ config . concurrency = 10 ] - the maximum number of sockets that will be opened to this node
function HttpConnector(host, config) {
  ConnectionAbstract.call(this, host, config);
  this.hand = handles[this.host.protocol];
  if (!this.hand) {
    throw new TypeError('Invalid protocol "' + this.host.protocol +
      '", expected one of ' + _.keys(handles).join(', '));
  }
  this.useSsl = this.host.protocol === 'https';
  config = _.defaults(config || {}, {
    keepAlive: true,
    minSockets: 10,
    maxSockets: 11
  });
  this.agent = this.createAgent(config);
}
function HttpConnector ( host , config ) { ConnectionAbstract . call ( this , host , config ) ; this . hand = handles [ this . host . protocol ] ; if ( ! this . hand ) { throw new TypeError ( 'Invalid protocol "' + this . host . protocol + '", expected one of ' + _ . keys ( handles ) . join ( ', ' ) ) ; } this . useSsl = this . host . protocol === 'https' ; config = _ . defaults ( config || { } , { keepAlive : true , minSockets : 10 , maxSockets : 11 } ) ; this . agent = this . createAgent ( config ) ; }
Connector used to talk to an elasticsearch node via HTTP
 @param {Host} host - The host object representing the elasticsearch node we will be talking to
 @param {Object} [config] - Configuration options (extends the configuration options for ConnectionAbstract)
 @param {Number} [config.concurrency=10] - the maximum number of sockets that will be opened to this node
Connector used to talk to an elasticsearch node via HTTP @param { Host } host - The host object representing the elasticsearch node we will be talking to @param { Object } [ config ] - Configuration options ( extends the configuration options for ConnectionAbstract ) @param { Number } [ config . concurrency = 10 ] - the maximum number of sockets that will be opened to this node
// 10 makes sense but 11 actually keeps 10 sockets around // https://github.com/mikeal/forever-agent/issues/8