Lines Matching refs:Agent
64 // New Agent code.
67 // an Agent instance holds connections for a variable number of host:ports.
73 // ClientRequest.onSocket(). The Agent is now *strictly*
90 function Agent(options) {
91 if (!(this instanceof Agent))
92 return new Agent(options);
111 this.maxSockets = this.options.maxSockets || Agent.defaultMaxSockets;
193 ObjectSetPrototypeOf(Agent.prototype, EventEmitter.prototype);
194 ObjectSetPrototypeOf(Agent, EventEmitter);
212 Agent.defaultMaxSockets = Infinity;
214 Agent.prototype.createConnection = net.createConnection;
217 Agent.prototype.getName = function getName(options = kEmptyObject) {
239 Agent.prototype.addRequest = function addRequest(req, options, port/* legacy */,
310 Agent.prototype.createSocket = function createSocket(req, options, cb) {
383 // This is the only place where sockets get removed from the Agent.
424 Agent.prototype.removeSocket = function removeSocket(s, options) {
482 Agent.prototype.keepSocketAlive = function keepSocketAlive(socket) {
494 Agent.prototype.reuseSocket = function reuseSocket(socket, req) {
501 Agent.prototype.destroy = function destroy() {
535 Agent,
536 globalAgent: new Agent(),