Skip to content

Instantly share code, notes, and snippets.

@andrewseddon
Created May 30, 2011 16:05
Show Gist options
  • Select an option

  • Save andrewseddon/999088 to your computer and use it in GitHub Desktop.

Select an option

Save andrewseddon/999088 to your computer and use it in GitHub Desktop.
function _getAgent (host, port, secure) {
var options = {
host: host,
port: port
};
var agent = !secure ? http.getAgent(options) : https.getAgent(options);
agent.maxSockets = maxSockets;
return agent;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment