From 69e6c5a212622ec15b8c2cf904480b6582c6c3a5 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Wed, 15 Nov 2017 10:55:31 -0800 Subject: http2: major update to internals This update does several significant things: 1. It eliminates the base Nghttp2* classes and folds those in to node::http2::Http2Session and node::http2::Http2Stream 2. It makes node::http2::Http2Stream a StreamBase instance and sends that out to JS-land to act as the [kHandle] for the JavaScript Http2Stream class. 3. It shifts some of the callbacks from C++ off of the JavaScript Http2Session class to the Http2Stream class. 4. It refactors the data provider structure for FD and Stream based sending to help encapsulate those functions easier 5. It streamlines some of the functions at the C++ layer to eliminate now unnecessary redirections 6. It cleans up node_http2.cc for better readability and maintainability 7. It refactors some of the debug output 8. Because Http2Stream instances are now StreamBases, they are now also trackable using async-hooks 9. The Stream::OnRead algorithm has been simplified with a couple bugs fixed. 10. I've eliminated node_http2_core.h and node_http2_core-inl.h 11. Detect invalid handshake a report protocol error to session 12. Refactor out of memory error, improve other errors 13. Add Http2Session.prototype.ping PR-URL: https://github.com/nodejs/node/pull/17105 Reviewed-By: Anna Henningsen Reviewed-By: Sebastiaan Deckers --- src/async_wrap.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/async_wrap.h') diff --git a/src/async_wrap.h b/src/async_wrap.h index f58f944327..98451ead3b 100644 --- a/src/async_wrap.h +++ b/src/async_wrap.h @@ -41,7 +41,8 @@ namespace node { V(GETADDRINFOREQWRAP) \ V(GETNAMEINFOREQWRAP) \ V(HTTP2SESSION) \ - V(HTTP2SESSIONSHUTDOWNWRAP) \ + V(HTTP2STREAM) \ + V(HTTP2PING) \ V(HTTPPARSER) \ V(JSSTREAM) \ V(PIPECONNECTWRAP) \ -- cgit v1.2.3