michael@0: // [node-http2-protocol][homepage] is an implementation of the [HTTP/2 (draft 10)][http2] michael@0: // framing layer for [node.js][node]. michael@0: // michael@0: // The main building blocks are [node.js streams][node-stream] that are connected through pipes. michael@0: // michael@0: // The main components are: michael@0: // michael@0: // * [Endpoint](endpoint.html): represents an HTTP/2 endpoint (client or server). It's michael@0: // responsible for the the first part of the handshake process (sending/receiving the michael@0: // [connection header][http2-connheader]) and manages other components (framer, compressor, michael@0: // connection, streams) that make up a client or server. michael@0: // michael@0: // * [Connection](connection.html): multiplexes the active HTTP/2 streams, manages connection michael@0: // lifecycle and settings, and responsible for enforcing the connection level limits (flow michael@0: // control, initiated stream limit) michael@0: // michael@0: // * [Stream](stream.html): implementation of the [HTTP/2 stream concept](http2-stream). michael@0: // Implements the [stream state machine][http2-streamstate] defined by the standard, provides michael@0: // management methods and events for using the stream (sending/receiving headers, data, etc.), michael@0: // and enforces stream level constraints (flow control, sending only legal frames). michael@0: // michael@0: // * [Flow](flow.html): implements flow control for Connection and Stream as parent class. michael@0: // michael@0: // * [Compressor and Decompressor](compressor.html): compression and decompression of HEADER and michael@0: // PUSH_PROMISE frames michael@0: // michael@0: // * [Serializer and Deserializer](framer.html): the lowest layer in the stack that transforms michael@0: // between the binary and the JavaScript object representation of HTTP/2 frames michael@0: // michael@0: // [homepage]: https://github.com/molnarg/node-http2 michael@0: // [http2]: http://tools.ietf.org/html/draft-ietf-httpbis-http2-10 michael@0: // [http2-connheader]: http://tools.ietf.org/html/draft-ietf-httpbis-http2-10#section-3.5 michael@0: // [http2-stream]: http://tools.ietf.org/html/draft-ietf-httpbis-http2-10#section-5 michael@0: // [http2-streamstate]: http://tools.ietf.org/html/draft-ietf-httpbis-http2-10#section-5.1 michael@0: // [node]: http://nodejs.org/ michael@0: // [node-stream]: http://nodejs.org/api/stream.html michael@0: // [node-https]: http://nodejs.org/api/https.html michael@0: // [node-http]: http://nodejs.org/api/http.html michael@0: michael@0: exports.ImplementedVersion = 'h2-10'; michael@0: michael@0: exports.Endpoint = require('./endpoint').Endpoint; michael@0: michael@0: /* Bunyan serializers exported by submodules that are worth adding when creating a logger. */ michael@0: exports.serializers = {}; michael@0: var modules = ['./framer', './compressor', './flow', './connection', './stream', './endpoint']; michael@0: modules.map(require).forEach(function(module) { michael@0: for (var name in module.serializers) { michael@0: exports.serializers[name] = module.serializers[name]; michael@0: } michael@0: }); michael@0: michael@0: /* michael@0: Stream API Endpoint API michael@0: Stream data michael@0: michael@0: | ^ | ^ michael@0: | | | | michael@0: | | | | michael@0: +-----------|------------|---------------------------------------+ michael@0: | | | Endpoint | michael@0: | | | | michael@0: | +-------|------------|-----------------------------------+ | michael@0: | | | | Connection | | michael@0: | | v | | | michael@0: | | +-----------------------+ +-------------------- | | michael@0: | | | Stream | | Stream ... | | michael@0: | | +-----------------------+ +-------------------- | | michael@0: | | | ^ | ^ | | michael@0: | | v | v | | | michael@0: | | +------------+--+--------+--+------------+- ... | | michael@0: | | | ^ | | michael@0: | | | | | | michael@0: | +-----------------------|--------|-----------------------+ | michael@0: | | | | michael@0: | v | | michael@0: | +--------------------------+ +--------------------------+ | michael@0: | | Compressor | | Decompressor | | michael@0: | +--------------------------+ +--------------------------+ | michael@0: | | ^ | michael@0: | v | | michael@0: | +--------------------------+ +--------------------------+ | michael@0: | | Serializer | | Deserializer | | michael@0: | +--------------------------+ +--------------------------+ | michael@0: | | ^ | michael@0: +---------------------------|--------|---------------------------+ michael@0: | | michael@0: v | michael@0: michael@0: Raw data michael@0: michael@0: */