Readonly [initProtected _readProtected _writeReadonly closedPProtected codeProtected connectionReadonly initiatedProtected loggerReadonly readableProtected Optional readableProtected readableProtected reasonProtected Optional rejectOptional reason: anyProtected Optional rejectOptional reason: anyProtected resolveProtected Optional resolveProtected Optional resolveReadonly streamReadonly typeReadonly writableProtected writableReturns true of the writable has closed.
Cancels the readable and aborts the writable.
If streams have already closed or cancelled then this will do nothing. If the underlying quiche streams already closed then this will do nothing.
Cancellation will occur in the background.
Optional reason: anyDestroy the QUIC stream.
Optional force?: booleanif true, this will cancel readable and abort writable.
Optional reason?: anythe reason to send to the peer, and if readable and writable is cancelled and aborted, then this will be the readable and writable error.
Protected handleProtected handleProtected handleHandles EventQUICStreamError.
This event propagates all errors relating to locally cancelling or aborting
the readable or writable, or receiving a RESET_STREAM or STOP_SENDING
on the readable or writable respectively.
Internal errors will be thrown upwards to become an uncaught exception.
Protected readableProtected readableProtected readableProtected writableProtected writableProtected writableProtected writableStatic createQUICStreamCreates a QUIC stream.
This creation is synchronous as it avoids the need for concurrent locking for generating new stream IDs.
Optional codemaps stream error codes to reasons
QUIC config
QUIC connection
local or peer initiated stream
Optional logger?: LoggerThe reasonToCode defaults to returning 0 as the code.
The codeToReason defaults to returning Error instance.
Optional reasonmaps stream error reasons to stream error codes
stream ID
Generated using TypeDoc
Returns true if the readable has closed.