AgentOptions

Inheritors

Properties

Link copied to clipboard

Milliseconds to subtract from the server-provided keep-alive: timeout=... hint when determining socket expiration time. This buffer helps ensure the agent closes the socket slightly before the server does, reducing the chance of sending a request on a socket that’s about to be closed by the server.

Link copied to clipboard
abstract var autoSelectFamily: Boolean?
Link copied to clipboard
Link copied to clipboard
abstract var blockList: BlockList?
Link copied to clipboard
abstract var defaultPort: Double?

Default port to use when the port is not specified in requests.

Link copied to clipboard
abstract var family: Double?
Link copied to clipboard
abstract var hints: Double?
Link copied to clipboard
abstract var host: String?
Link copied to clipboard
abstract override var keepAlive: Boolean?

Keep sockets around in a pool to be used by other requests in the future. Default = false

Link copied to clipboard
Link copied to clipboard
abstract var keepAliveMsecs: Double?

When using HTTP KeepAlive, how often to send TCP KeepAlive packets over sockets being kept alive. Default = 1000. Only relevant if keepAlive is set to true.

Link copied to clipboard
abstract var localAddress: String?
Link copied to clipboard
abstract var localPort: Double?
Link copied to clipboard
abstract var lookup: LookupFunction?
Link copied to clipboard
abstract var maxFreeSockets: Double?

Maximum number of sockets to leave open in a free state. Only relevant if keepAlive is set to true. Default = 256.

Link copied to clipboard
abstract var maxSockets: Double?

Maximum number of sockets to allow per host. Default for Node 0.10 is 5, default for Node 0.12 is Infinity

Link copied to clipboard
abstract var maxTotalSockets: Double?

Maximum number of sockets allowed for all hosts in total. Each request will use a new socket until the maximum is reached. Default: Infinity.

Link copied to clipboard
abstract var noDelay: Boolean?
Link copied to clipboard
abstract var port: Double
Link copied to clipboard
abstract var protocol: String?

The protocol to use for the agent.

Link copied to clipboard
abstract var proxyEnv: ProxyEnv?

Environment variables for proxy configuration. See Built-in Proxy Support for details.

Link copied to clipboard

Scheduling strategy to apply when picking the next free socket to use.

Link copied to clipboard
abstract var timeout: Double?

Socket timeout in milliseconds. This will set the timeout after the socket is connected.