# Interface AgentOptions

Make all properties in T optional

#### Hierarchy

- Partial<TcpSocketConnectOpts>
  - AgentOptions

#####
Index

### Properties

autoSelectFamily?
autoSelectFamilyAttemptTimeout?
family?
hints?
host?
keepAlive?
keepAliveInitialDelay?
keepAliveMsecs?
localAddress?
localPort?
lookup?
maxFreeSockets?
maxSockets?
maxTotalSockets?
noDelay?
onread?
port?
scheduling?
timeout?

## Properties

### `Optional` autoSelectFamily

autoSelectFamily?: boolean

#### Since

v18.13.0

Inherited from Partial.autoSelectFamily

### `Optional` autoSelectFamilyAttemptTimeout

autoSelectFamilyAttemptTimeout?: number

#### Since

v18.13.0

Inherited from Partial.autoSelectFamilyAttemptTimeout

### `Optional` family

family?: number

Inherited from Partial.family

### `Optional` hints

hints?: number

Inherited from Partial.hints

### `Optional` host

host?: string

Inherited from Partial.host

### `Optional` keepAlive

keepAlive?: boolean

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

Overrides Partial.keepAlive

### `Optional` keepAliveInitialDelay

keepAliveInitialDelay?: number

Inherited from Partial.keepAliveInitialDelay

### `Optional` keepAliveMsecs

keepAliveMsecs?: number

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.

### `Optional` localAddress

localAddress?: string

Inherited from Partial.localAddress

### `Optional` localPort

localPort?: number

Inherited from Partial.localPort

### `Optional` lookup

lookup?: LookupFunction

Inherited from Partial.lookup

### `Optional` maxFreeSockets

maxFreeSockets?: number

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

### `Optional` maxSockets

maxSockets?: number

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

### `Optional` maxTotalSockets

maxTotalSockets?: number

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

### `Optional` noDelay

noDelay?: boolean

Inherited from Partial.noDelay

### `Optional` onread

onread?: OnReadOpts

If specified, incoming data is stored in a single buffer and passed to the supplied callback when data arrives on the socket. Note: this will cause the streaming functionality to not provide any data, however events like 'error', 'end', and 'close' will still be emitted as normal and methods like pause() and resume() will also behave as expected.

Inherited from Partial.onread

### `Optional` port

port?: number

Inherited from Partial.port

### `Optional` scheduling

scheduling?: "fifo" | "lifo"

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

#### Default

`lifo`

### `Optional` timeout

timeout?: number

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

Generated using TypeDoc