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

Function onStream

test/parallel/test-http2-server-rst-before-respond.js:14–23  ·  view source on GitHub ↗
(stream, headers, flags)

Source from the content-addressed store, hash-verified

12server.on('stream', common.mustCall(onStream));
13
14function onStream(stream, headers, flags) {
15 stream.close();
16
17 assert.throws(() => {
18 stream.additionalHeaders({
19 ':status': 123,
20 'abc': 123
21 });
22 }, { code: 'ERR_HTTP2_INVALID_STREAM' });
23}
24
25server.listen(0);
26

Callers

nothing calls this directly

Calls 2

additionalHeadersMethod · 0.80
closeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…