Coconstructor
Bun

constructor

quic.QuicEndpoint.constructor

Not implemented in Bun

constructor QuicEndpoint(
options?: EndpointOptions

Referenced types

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 localhost on 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 cache. This is an advanced option that users typically won't have need to specify.

  • ipv6Only?: boolean

    When true, indicates that the endpoint should bind only to IPv6 addresses.

  • maxConnectionsPerHost?: number | bigint

    Specifies the maximum number of concurrent sessions allowed per remote peer address.

  • maxConnectionsTotal?: number | bigint

    Specifies the maximum total number of concurrent sessions.

  • 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.

  • tokenExpiration?: number | bigint

    Specifies the length of time a QUIC token is considered valid.

  • tokenSecret?: ArrayBufferView<ArrayBufferLike>

    Specifies the 16-byte secret used to generate QUIC tokens.

  • udpTTL?: number
  • validateAddress?: boolean

    When true, requires that the endpoint validate peer addresses using retry packets while establishing a new connection.

namespace QuicEndpoint

  • class Stats

    A view of the collected statistics for an endpoint.

    • readonly bytesReceived: bigint

      The total number of bytes received by this endpoint. Read only.

    • readonly bytesSent: bigint

      The total number of bytes sent by this endpoint. Read only.

    • readonly clientSessions: bigint

      The total number of sessions initiated by this endpoint. Read only.

    • readonly createdAt: bigint

      A timestamp indicating the moment the endpoint was created. Read only.

    • readonly destroyedAt: bigint

      A timestamp indicating the moment the endpoint was destroyed. Read only.

    • readonly immediateCloseCount: bigint

      The total number of sessions that were closed before handshake completed. Read only.

    • readonly packetsReceived: bigint

      The total number of QUIC packets successfully received by this endpoint. Read only.

    • readonly packetsSent: bigint

      The total number of QUIC packets successfully sent by this endpoint. Read only.

    • readonly retryCount: bigint

      The total number of QUIC retry attempts on this endpoint. Read only.

    • readonly serverBusyCount: bigint

      The total number of times an initial packet was rejected due to the endpoint being marked busy. Read only.

    • readonly serverSessions: bigint

      The total number of peer-initiated sessions received by this endpoint. Read only.

    • readonly statelessResetCount: bigint

      The total number of stateless resets handled by this endpoint. Read only.

    • readonly versionNegotiationCount: bigint

      The total number sessions rejected due to QUIC version mismatch. Read only.