Skip to content

http2: support generic `Duplex` streams

Commits:

  • src: allow top-level calls into JSStream Allow JSStream instances to be used more flexibly by explicitly enabling calls that have no JS stack below them.

  • src: turn JS stream into a full duplex Remove unused methods for reading data from JSStream and add those required for emitting data or an EOF event to the JS side, in essentially the same way that LibuvStreamWrap does it.

  • http2: support generic Duplex streams Support generic Duplex streams through using StreamWrap on the server and client sides, and adding a createConnection method option similar to what the HTTP/1 API provides.

    Since HTTP2 is, as a protocol, independent of its underlying transport layer, Node.js should not enforce any restrictions on what streams its internals may use.

Ref: #16256 (closed)

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

http2

Merge request reports

Loading