interface

quic.SessionDestroyOptions

interface SessionDestroyOptions

  • code?: number | bigint

    The error code to include in the CONNECTION_CLOSE frame sent to the peer. Default: 0 (no error).

  • reason?: string

    An optional human-readable reason string included in the CONNECTION_CLOSE frame. Per RFC 9000, this is for diagnostic purposes only and should not be used for machine-readable error descriptions.

  • type?: 'transport' | 'application'

    Either 'transport' or 'application'. Determines the error code namespace used in the CONNECTION_CLOSE frame. When 'transport' (the default), the frame type is 0x1c and the code is interpreted as a QUIC transport error. When 'application', the frame type is 0x1d and the code is application-specific. Default: 'transport'.