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

Function onStreamTrailers

lib/internal/http2/core.js:486–495  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

484// trailers to be sent. This will only be called if the { hasOptions: true }
485// option is set.
486function onStreamTrailers() {
487 const stream = this[kOwner];
488 stream[kState].trailersReady = true;
489 if (stream.destroyed || stream.closed)
490 return;
491 if (!stream.emit('wantTrailers')) {
492 // There are no listeners, send empty trailing HEADERS frame and close.
493 stream.sendTrailers({});
494 }
495}
496
497// Submit an RST-STREAM frame to be sent to the remote peer.
498// This will cause the Http2Stream to be closed.

Callers

nothing calls this directly

Calls 2

emitMethod · 0.45
sendTrailersMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…