import { Agent } from "https://deno.land/x/web3@v0.11.1/types/http.d.ts";
Constructors
Properties
An object which contains arrays of sockets currently awaiting use by
the agent when keepAlive
is enabled. Do not modify.
Sockets in the freeSockets
list will be automatically destroyed and
removed from the array on 'timeout'
.
By default set to 256. For agents with keepAlive
enabled, this
sets the maximum number of sockets that will be left open in the free
state.
By default set to Infinity
. Determines how many concurrent sockets the agent
can have open per origin. Origin is the returned value of agent.getName()
.
By default set to Infinity
. Determines how many concurrent sockets the agent
can have open. Unlike maxSockets
, this parameter applies across all origins.
An object which contains queues of requests that have not yet been assigned to sockets. Do not modify.
Methods
Destroy any sockets that are currently in use by the agent.
It is usually not necessary to do this. However, if using an
agent with keepAlive
enabled, then it is best to explicitly shut down
the agent when it is no longer needed. Otherwise,
sockets might stay open for quite a long time before the server
terminates them.