MCPcopy Index your code
hub / github.com/nodejs/node / initStreamingBackpressure

Function initStreamingBackpressure

lib/internal/quic/quic.js:1410–1420  ·  view source on GitHub ↗
(stream)

Source from the content-addressed store, hash-verified

1408// Blob, FileHandle, etc.) do not use this -- they go through attachSource
1409// and are not subject to backpressure.
1410function initStreamingBackpressure(stream) {
1411 const state = getQuicStreamState(stream);
1412 // Only set defaults if the user hasn't already configured them
1413 // (e.g., via createBidirectionalStream({ highWaterMark: N })).
1414 if (state.highWaterMark === 0) {
1415 state.highWaterMark = kDefaultHighWaterMark;
1416 }
1417 if (state.writeDesiredSize === 0) {
1418 state.writeDesiredSize = state.highWaterMark;
1419 }
1420}
1421
1422// Waits for the stream's drain callback to fire, indicating the
1423// outbound has capacity for more data.

Callers 3

consumeAsyncSourceFunction · 0.85
consumeSyncSourceFunction · 0.85
writerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…