Skip to content

streamWithBackpressure

streamWithBackpressure(stream, bufferSize): IRChatStream

Defined in: streaming.ts:690

Add backpressure control to stream.

Buffers chunks and allows consumer to control flow.

IRChatStream

Original stream

number = 10

Maximum buffer size before pausing

IRChatStream

Stream with backpressure control