Agent class

Extends

Agent

Constructors

Agent(any)

Properties

freeSockets
maxFreeSockets
maxSockets
maxTotalSockets
requests
sockets

Methods

destroy()

Destroy any sockets that are currently in use by the agent. It is usually not necessary to do this. However, if you are using an agent with KeepAlive enabled, then it is best to explicitly shut down the agent when you know that it will no longer be used. Otherwise, sockets may hang open for quite a long time before the server terminates them.

fetchIssuer(DetailedPeerCertificate, Certificate, (error: string, result: DetailedPeerCertificate) => void)

Constructor Details

Agent(any)

new Agent(options: any)

Parameters

options

any

Property Details

freeSockets

freeSockets: ReadOnlyDict<Socket[]>

Property Value

ReadOnlyDict<Socket[]>

maxFreeSockets

maxFreeSockets: number

Property Value

number

maxSockets

maxSockets: number

Property Value

number

maxTotalSockets

maxTotalSockets: number

Property Value

number

requests

requests: ReadOnlyDict<IncomingMessage[]>

Property Value

ReadOnlyDict<IncomingMessage[]>

sockets

sockets: ReadOnlyDict<Socket[]>

Property Value

ReadOnlyDict<Socket[]>

Method Details

destroy()

Destroy any sockets that are currently in use by the agent. It is usually not necessary to do this. However, if you are using an agent with KeepAlive enabled, then it is best to explicitly shut down the agent when you know that it will no longer be used. Otherwise, sockets may hang open for quite a long time before the server terminates them.

function destroy()

fetchIssuer(DetailedPeerCertificate, Certificate, (error: string, result: DetailedPeerCertificate) => void)

function fetchIssuer(peerCert: DetailedPeerCertificate, stapling: Certificate, cb: (error: string, result: DetailedPeerCertificate) => void)

Parameters

peerCert

DetailedPeerCertificate

stapling

Certificate

cb

(error: string, result: DetailedPeerCertificate) => void