index.js (3195B)
1 // [node-http2][homepage] is an [HTTP/2][http2] implementation for [node.js][node]. 2 // 3 // The core of the protocol is implemented in the protocol sub-directory. This directory provides 4 // two important features on top of the protocol: 5 // 6 // * Implementation of different negotiation schemes that can be used to start a HTTP2 connection. 7 // These include TLS ALPN, Upgrade and Plain TCP. 8 // 9 // * Providing an API very similar to the standard node.js [HTTPS module API][node-https] 10 // (which is in turn very similar to the [HTTP module API][node-http]). 11 // 12 // [homepage]: https://github.com/molnarg/node-http2 13 // [http2]: https://tools.ietf.org/html/rfc7540 14 // [node]: https://nodejs.org/ 15 // [node-https]: https://nodejs.org/api/https.html 16 // [node-http]: https://nodejs.org/api/http.html 17 18 module.exports = require('./http'); 19 20 /* 21 HTTP API 22 23 | ^ 24 | | 25 +-------------|------------|------------------------------------------------------+ 26 | | | Server/Agent | 27 | v | | 28 | +----------+ +----------+ | 29 | | Outgoing | | Incoming | | 30 | | req/res. | | req/res. | | 31 | +----------+ +----------+ | 32 | | ^ | 33 | | | | 34 | +---------|------------|-------------------------------------+ +----- | 35 | | | | Endpoint | | | 36 | | | | | | | 37 | | v | | | | 38 | | +-----------------------+ +-------------------- | | | 39 | | | Stream | | Stream ... | | | 40 | | +-----------------------+ +-------------------- | | | 41 | | | | | 42 | +------------------------------------------------------------+ +----- | 43 | | | | 44 | | | | 45 | v | | 46 | +------------------------------------------------------------+ +----- | 47 | | TCP stream | | ... | 48 | +------------------------------------------------------------+ +----- | 49 | | 50 +---------------------------------------------------------------------------------+ 51 52 */