Fields

@:optionaloptionaltimeout:Null<Int>

Socket timeout in milliseconds. This will set the timeout when the socket is created.

@:optionaloptionalservername:Null<String>

the value of Server Name Indication extension to be sent to the server. Use empty string '' to disable sending the extension.

Default: hostname of the target server, unless the target server is specified using an IP address, in which case the default is '' (no extension).

@:optionaloptionalmaxSockets:Null<Int>

Maximum number of sockets to allow per host. Each request will use a new socket until the maximum is reached.

Default: Infinity.

@:optionaloptionalmaxFreeSockets:Null<Int>

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

Default: 256.

@:optionaloptionalmaxCachedSessions:Null<Int>

maximum number of TLS cached sessions. Use 0 to disable TLS session caching.

Default: 100.

@:optionaloptionalkeepAliveMsecs:Null<Int>

When using the keepAlive option, specifies the initial delay for TCP Keep-Alive packets. Ignored when the keepAlive option is false or undefined.

Default: 1000.

@:optionaloptionalkeepAlive:Null<Bool>

Keep sockets around even when there are no outstanding requests, so they can be used for future requests without having to reestablish a TCP connection. Not to be confused with the keep-alive value of the Connection header. The Connection: keep-alive header is always sent when using an agent except when the Connection header is explicitly specified or when the keepAlive and maxSockets options are respectively set to false and Infinity, in which case Connection: close will be used.

Default: false