1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/testing/xpcshell/node-http2/node_modules/http2-protocol/lib/index.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,92 @@ 1.4 +// [node-http2-protocol][homepage] is an implementation of the [HTTP/2 (draft 10)][http2] 1.5 +// framing layer for [node.js][node]. 1.6 +// 1.7 +// The main building blocks are [node.js streams][node-stream] that are connected through pipes. 1.8 +// 1.9 +// The main components are: 1.10 +// 1.11 +// * [Endpoint](endpoint.html): represents an HTTP/2 endpoint (client or server). It's 1.12 +// responsible for the the first part of the handshake process (sending/receiving the 1.13 +// [connection header][http2-connheader]) and manages other components (framer, compressor, 1.14 +// connection, streams) that make up a client or server. 1.15 +// 1.16 +// * [Connection](connection.html): multiplexes the active HTTP/2 streams, manages connection 1.17 +// lifecycle and settings, and responsible for enforcing the connection level limits (flow 1.18 +// control, initiated stream limit) 1.19 +// 1.20 +// * [Stream](stream.html): implementation of the [HTTP/2 stream concept](http2-stream). 1.21 +// Implements the [stream state machine][http2-streamstate] defined by the standard, provides 1.22 +// management methods and events for using the stream (sending/receiving headers, data, etc.), 1.23 +// and enforces stream level constraints (flow control, sending only legal frames). 1.24 +// 1.25 +// * [Flow](flow.html): implements flow control for Connection and Stream as parent class. 1.26 +// 1.27 +// * [Compressor and Decompressor](compressor.html): compression and decompression of HEADER and 1.28 +// PUSH_PROMISE frames 1.29 +// 1.30 +// * [Serializer and Deserializer](framer.html): the lowest layer in the stack that transforms 1.31 +// between the binary and the JavaScript object representation of HTTP/2 frames 1.32 +// 1.33 +// [homepage]: https://github.com/molnarg/node-http2 1.34 +// [http2]: http://tools.ietf.org/html/draft-ietf-httpbis-http2-10 1.35 +// [http2-connheader]: http://tools.ietf.org/html/draft-ietf-httpbis-http2-10#section-3.5 1.36 +// [http2-stream]: http://tools.ietf.org/html/draft-ietf-httpbis-http2-10#section-5 1.37 +// [http2-streamstate]: http://tools.ietf.org/html/draft-ietf-httpbis-http2-10#section-5.1 1.38 +// [node]: http://nodejs.org/ 1.39 +// [node-stream]: http://nodejs.org/api/stream.html 1.40 +// [node-https]: http://nodejs.org/api/https.html 1.41 +// [node-http]: http://nodejs.org/api/http.html 1.42 + 1.43 +exports.ImplementedVersion = 'h2-10'; 1.44 + 1.45 +exports.Endpoint = require('./endpoint').Endpoint; 1.46 + 1.47 +/* Bunyan serializers exported by submodules that are worth adding when creating a logger. */ 1.48 +exports.serializers = {}; 1.49 +var modules = ['./framer', './compressor', './flow', './connection', './stream', './endpoint']; 1.50 +modules.map(require).forEach(function(module) { 1.51 + for (var name in module.serializers) { 1.52 + exports.serializers[name] = module.serializers[name]; 1.53 + } 1.54 +}); 1.55 + 1.56 +/* 1.57 + Stream API Endpoint API 1.58 + Stream data 1.59 + 1.60 + | ^ | ^ 1.61 + | | | | 1.62 + | | | | 1.63 + +-----------|------------|---------------------------------------+ 1.64 + | | | Endpoint | 1.65 + | | | | 1.66 + | +-------|------------|-----------------------------------+ | 1.67 + | | | | Connection | | 1.68 + | | v | | | 1.69 + | | +-----------------------+ +-------------------- | | 1.70 + | | | Stream | | Stream ... | | 1.71 + | | +-----------------------+ +-------------------- | | 1.72 + | | | ^ | ^ | | 1.73 + | | v | v | | | 1.74 + | | +------------+--+--------+--+------------+- ... | | 1.75 + | | | ^ | | 1.76 + | | | | | | 1.77 + | +-----------------------|--------|-----------------------+ | 1.78 + | | | | 1.79 + | v | | 1.80 + | +--------------------------+ +--------------------------+ | 1.81 + | | Compressor | | Decompressor | | 1.82 + | +--------------------------+ +--------------------------+ | 1.83 + | | ^ | 1.84 + | v | | 1.85 + | +--------------------------+ +--------------------------+ | 1.86 + | | Serializer | | Deserializer | | 1.87 + | +--------------------------+ +--------------------------+ | 1.88 + | | ^ | 1.89 + +---------------------------|--------|---------------------------+ 1.90 + | | 1.91 + v | 1.92 + 1.93 + Raw data 1.94 + 1.95 +*/