interface
quic.EndpointOptions
interface EndpointOptions
The endpoint configuration options passed when constructing a new QuicEndpoint instance.
- address?: string | SocketAddress
If not specified the endpoint will bind to IPv4
localhoston a random port. - addressLRUSize?: number | bigint
The endpoint maintains an internal cache of validated socket addresses as a performance optimization. This option sets the maximum number of addresses that are cached. This is an advanced option that users typically won't have need to specify.
- disableStatelessReset?: boolean
When
true, the endpoint will not send stateless reset packets in response to packets from unknown connections. Stateless resets allow a peer to detect that a connection has been lost even when the server has no state for it. Disabling them may be useful in testing or when stateless resets are handled at a different layer. - idleTimeout?: number
The number of seconds an endpoint will remain alive after all sessions have closed and it is no longer listening. A value of
0(default) means the endpoint is only destroyed when explicitly closed viaendpoint.close()orendpoint.destroy(). A positive value starts an idle timer when the endpoint becomes idle; if no new sessions are created before the timer fires, the endpoint is automatically destroyed. This is useful for connection pooling where endpoints should linger briefly for reuse by futureconnect()calls. - maxConnectionsPerHost?: number
Specifies the maximum number of concurrent sessions allowed per remote IP address (ignoring port). When the limit is reached, new connections from the same IP are refused with
CONNECTION_REFUSED. A value of0disables the limit. The maximum value is65535.This limit can also be changed dynamically after construction via
endpoint.maxConnectionsPerHost. - maxConnectionsTotal?: number
Specifies the maximum total number of concurrent sessions across all remote addresses. When the limit is reached, new connections are refused with
CONNECTION_REFUSED. A value of0disables the limit. The maximum value is65535.This limit can also be changed dynamically after construction via
endpoint.maxConnectionsTotal. - maxRetries?: number | bigint
Specifies the maximum number of QUIC retry attempts allowed per remote peer address.
- maxStatelessResetsPerHost?: number | bigint
Specifies the maximum number of stateless resets that are allowed per remote peer address.
- resetTokenSecret?: ArrayBufferView<ArrayBufferLike>
Specifies the 16-byte secret used to generate QUIC retry tokens.
- retryTokenExpiration?: number | bigint
Specifies the length of time a QUIC retry token is considered valid.
- tokenSecret?: ArrayBufferView<ArrayBufferLike>
Specifies the 16-byte secret used to generate QUIC tokens.
- validateAddress?: boolean
When
true, requires that the endpoint validate peer addresses using retry packets while establishing a new connection.