interface
quic.CreateStreamOptions
interface CreateStreamOptions
- body?: StreamBody
The outbound body source. See
stream.setBody()for details on supported types. When omitted, the stream starts half-closed (writable side open, no body queued). - headers?: readonly string[] | Dict<string | readonly string[]>
Initial request or response headers to send. Only used when the session supports headers (e.g. HTTP/3). If
bodyis not specified andheadersis provided, the stream is treated as headers-only (terminal). - highWaterMark?: number
The maximum number of bytes that the writer will buffer before
writeSync()returnsfalse. When the buffered data exceeds this limit, the caller should wait for drain before writing more. Default:65536(64 KB). - incremental?: boolean
When
true, data from this stream may be interleaved with data from other streams of the same priority level. Whenfalse, the stream should be completed before same-priority peers. Default:false. - onheaders?: (this: QuicStream, headers: Dict<string | string[]>) => void
Callback for received initial response headers. Called with
(headers). - oninfo?: (this: QuicStream, headers: Dict<string | string[]>) => void
Callback for received informational (1xx) headers. Called with
(headers). - ontrailers?: (this: QuicStream, trailers: Dict<string | string[]>) => void
Callback for received trailing headers. Called with
(trailers). - priority?: 'default' | 'high' | 'low'
The priority level of the stream. One of
'high','default', or'low'. Default:'default'.