# Interface ServerOptions<Request, Response>

interface ServerOptions<Request, Response> {
IncomingMessage?: Request;
ServerResponse?: Response;
connectionsCheckingInterval?: number;
highWaterMark?: number;
insecureHTTPParser?: boolean;
joinDuplicateHeaders?: boolean;
keepAlive?: boolean;
keepAliveInitialDelay?: number;
keepAliveTimeout?: number;
maxHeaderSize?: number;
noDelay?: boolean;
requestTimeout?: number;
uniqueHeaders?: (string | string[])[];
}

#### Type Parameters

- Request extends typeof IncomingMessage = typeof IncomingMessage
- Response extends typeof ServerResponse = typeof ServerResponse

- Defined in node_modules/@types/node/http.d.ts:232

#####
Index

### Properties

IncomingMessage?
ServerResponse?
connectionsCheckingInterval?
highWaterMark?
insecureHTTPParser?
joinDuplicateHeaders?
keepAlive?
keepAliveInitialDelay?
keepAliveTimeout?
maxHeaderSize?
noDelay?
requestTimeout?
uniqueHeaders?

## Properties

### `Optional` IncomingMessage

IncomingMessage?: Request

Specifies the `IncomingMessage` class to be used. Useful for extending the original `IncomingMessage`.

- Defined in node_modules/@types/node/http.d.ts:239

### `Optional` ServerResponse

ServerResponse?: Response

Specifies the `ServerResponse` class to be used. Useful for extending the original `ServerResponse`.

- Defined in node_modules/@types/node/http.d.ts:243

### `Optional` connectionsCheckingInterval

connectionsCheckingInterval?: number

Sets the interval value in milliseconds to check for request and headers timeout in incomplete requests.

#### Default

    30000

- Defined in node_modules/@types/node/http.d.ts:269

### `Optional` highWaterMark

highWaterMark?: number

Optionally overrides all `socket`s' `readableHighWaterMark` and `writableHighWaterMark`. This affects `highWaterMark` property of both `IncomingMessage` and `ServerResponse`. Default:

#### See

stream.getDefaultHighWaterMark().

#### Since

v20.1.0

- Defined in node_modules/@types/node/http.d.ts:276

### `Optional` insecureHTTPParser

insecureHTTPParser?: boolean

Use an insecure HTTP parser that accepts invalid HTTP headers when `true`. Using the insecure parser should be avoided. See --insecure-http-parser for more information.

#### Default

    false

- Defined in node_modules/@types/node/http.d.ts:283

### `Optional` joinDuplicateHeaders

joinDuplicateHeaders?: boolean

It joins the field line values of multiple headers in a request with `,` instead of discarding the duplicates.

#### Default

    false

#### Since

v18.14.0

- Defined in node_modules/@types/node/http.d.ts:256

### `Optional` keepAlive

keepAlive?: boolean

If set to `true`, it enables keep-alive functionality on the socket immediately after a new incoming connection is received, similarly on what is done in `socket.setKeepAlive([enable][, initialDelay])`.

#### Default

    false

#### Since

v16.5.0

- Defined in node_modules/@types/node/http.d.ts:303

### `Optional` keepAliveInitialDelay

keepAliveInitialDelay?: number

If set to a positive number, it sets the initial delay before the first keepalive probe is sent on an idle socket.

#### Default

    0

#### Since

v16.5.0

- Defined in node_modules/@types/node/http.d.ts:309

### `Optional` keepAliveTimeout

keepAliveTimeout?: number

The number of milliseconds of inactivity a server needs to wait for additional incoming data, after it has finished writing the last response, before a socket will be destroyed.

#### See

Server.keepAliveTimeout for more information.

#### Default

    5000

#### Since

v18.0.0

- Defined in node_modules/@types/node/http.d.ts:264

### `Optional` maxHeaderSize

maxHeaderSize?: number

Optionally overrides the value of `--max-http-header-size` for requests received by this server, i.e. the maximum length of request headers in bytes.

#### Default

    16384

#### Since

v13.3.0

- Defined in node_modules/@types/node/http.d.ts:290

### `Optional` noDelay

noDelay?: boolean

If set to `true`, it disables the use of Nagle's algorithm immediately after a new incoming connection is received.

#### Default

    true

#### Since

v16.5.0

- Defined in node_modules/@types/node/http.d.ts:296

### `Optional` requestTimeout

requestTimeout?: number

Sets the timeout value in milliseconds for receiving the entire request from the client.

#### See

Server.requestTimeout for more information.

#### Default

    300000

#### Since

v18.0.0

- Defined in node_modules/@types/node/http.d.ts:250

### `Optional` uniqueHeaders

uniqueHeaders?: (string | string[])[]

A list of response headers that should be sent only once. If the header's value is an array, the items will be joined using `;` .

- Defined in node_modules/@types/node/http.d.ts:314