Lines Matching refs:name
126 const name = this.getName(options);
127 debug('agent.on(free)', name);
139 const requests = this.requests[name];
154 delete this.requests[name];
167 const freeSockets = this.freeSockets[name] || [];
170 if (this.sockets[name])
171 count += this.sockets[name].length;
181 this.freeSockets[name] = freeSockets;
218 let name = options.host || 'localhost';
220 name += ':';
222 name += options.port;
224 name += ':';
226 name += options.localAddress;
231 name += `:${options.family}`;
234 name += `:${options.socketPath}`;
236 return name;
258 const name = this.getName(options);
259 if (!this.sockets[name]) {
260 this.sockets[name] = [];
263 const freeSockets = this.freeSockets[name];
273 delete this.freeSockets[name];
277 const sockLen = freeLen + this.sockets[name].length;
283 ArrayPrototypePush(this.sockets[name], socket);
297 if (!this.requests[name]) {
298 this.requests[name] = [];
306 ArrayPrototypePush(this.requests[name], req);
318 const name = this.getName(options);
319 options._agentKey = name;
321 debug('createConnection', name, options);
327 if (!this.sockets[name]) {
328 this.sockets[name] = [];
330 ArrayPrototypePush(this.sockets[name], s);
332 debug('sockets', name, this.sockets[name].length, this.totalSocketCount);
397 if (ArrayPrototypeSome(ObjectKeys(sockets), (name) =>
398 ArrayPrototypeIncludes(sockets[name], s),
425 const name = this.getName(options);
426 debug('removeSocket', name, 'writable:', s.writable);
436 if (sockets[name]) {
437 const index = ArrayPrototypeIndexOf(sockets[name], s);
439 ArrayPrototypeSplice(sockets[name], index, 1);
441 if (sockets[name].length === 0)
442 delete sockets[name];
448 if (this.requests[name] && this.requests[name].length) {
450 req = this.requests[name][0];