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

Function onStream

test/parallel/test-http2-priority-event.js:18–29  ·  view source on GitHub ↗
(stream, headers, flags)

Source from the content-addressed store, hash-verified

16server.on('stream', common.mustCall(onStream));
17
18function onStream(stream, headers, flags) {
19 stream.priority({
20 parent: 0,
21 weight: 1,
22 exclusive: false
23 });
24 stream.respond({
25 'content-type': 'text/html',
26 ':status': 200
27 });
28 stream.end('hello world');
29}
30
31server.listen(0);
32

Callers

nothing calls this directly

Calls 3

priorityMethod · 0.80
respondMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected