Skip to content

HttpServerOptions

HttpServerOptions = object

Defined in: packages/net-http/src/server/http-server.ts:24

Construction options for HttpServer. Every limit is required.

readonly handler: HttpHandler

Defined in: packages/net-http/src/server/http-server.ts:25


readonly optional http2?: Http2Limits

Defined in: packages/net-http/src/server/http-server.ts:49

Serve HTTP/2 with these limits: on connections that negotiated h2 through ALPN, and on cleartext connections opening with the HTTP/2 preface (prior knowledge). Absent, only HTTP/1.x is served.


readonly optional http3?: Http3Limits

Defined in: packages/net-http/src/server/http-server.ts:56

Serve HTTP/3 with these limits, on the QUIC connections of a multiplexed listener (QuicListener from @ac-kit/net-quic) that negotiated h3. Absent, such connections are refused.


readonly idleTimeoutMs: number

Defined in: packages/net-http/src/server/http-server.ts:39

How long, in milliseconds, a connection may wait for its next request head to arrive complete; see Http1ServerConnection. Over HTTP/2, how long a connection may stay without any open stream.


readonly maxConnections: number

Defined in: packages/net-http/src/server/http-server.ts:42

Connections served at once; one more is closed as soon as accepted.


readonly maxHeadSize: number

Defined in: packages/net-http/src/server/http-server.ts:32

Largest request head accepted, in bytes; see Http1ServerConnection. Over HTTP/2, the largest decoded field section (SETTINGS_MAX_HEADER_LIST_SIZE).