mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-27 05:00:13 -10:00
107 lines
4.7 KiB
HTML
107 lines
4.7 KiB
HTML
<!DOCTYPE html>
|
|
|
|
<html>
|
|
<head>
|
|
<title>index.js</title>
|
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
|
<meta name="viewport" content="width=device-width, target-densitydpi=160dpi, initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
|
|
<link rel="stylesheet" media="all" href="docco.css" />
|
|
</head>
|
|
<body>
|
|
<div id="container">
|
|
<div id="background"></div>
|
|
|
|
<ul id="jump_to">
|
|
<li>
|
|
<a class="large" href="javascript:void(0);">Jump To …</a>
|
|
<a class="small" href="javascript:void(0);">+</a>
|
|
<div id="jump_wrapper">
|
|
<div id="jump_page">
|
|
|
|
|
|
<a class="source" href="http.html">
|
|
http.js
|
|
</a>
|
|
|
|
|
|
<a class="source" href="index.html">
|
|
index.js
|
|
</a>
|
|
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
|
|
<ul class="sections">
|
|
|
|
<li id="title">
|
|
<div class="annotation">
|
|
<h1>index.js</h1>
|
|
</div>
|
|
</li>
|
|
|
|
|
|
|
|
<li id="section-1">
|
|
<div class="annotation">
|
|
|
|
<div class="pilwrap ">
|
|
<a class="pilcrow" href="#section-1">¶</a>
|
|
</div>
|
|
<p><a href="https://github.com/molnarg/node-http2">node-http2</a> is an <a href="http://tools.ietf.org/html/draft-ietf-httpbis-http2-09">HTTP/2 (draft 09)</a> implementation for <a href="http://nodejs.org/">node.js</a>.</p>
|
|
<p>The core of the protocol is implemented by the <a href="https://github.com/molnarg/node-http2-protocol">http2-protocol</a> module. This module provides
|
|
two important features on top of http2-protocol:</p>
|
|
<ul>
|
|
<li><p>Implementation of different negotiation schemes that can be used to start a HTTP2 connection.
|
|
These include TLS ALPN, Upgrade and Plain TCP.</p>
|
|
</li>
|
|
<li><p>Providing an API very similar to the standard node.js <a href="http://nodejs.org/api/https.html">HTTPS module API</a>
|
|
(which is in turn very similar to the <a href="http://nodejs.org/api/http.html">HTTP module API</a>).</p>
|
|
</li>
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div class="content"><div class='highlight'><pre>module.exports = require(<span class="string">'./http'</span>);
|
|
|
|
<span class="comment">/*
|
|
HTTP API
|
|
|
|
| ^
|
|
| |
|
|
+-------------|------------|------------------------------------------------------+
|
|
| | | Server/Agent |
|
|
| v | |
|
|
| +----------+ +----------+ |
|
|
| | Outgoing | | Incoming | |
|
|
| | req/res. | | req/res. | |
|
|
| +----------+ +----------+ |
|
|
| | ^ |
|
|
| | | |
|
|
| +---------|------------|-------------------------------------+ +----- |
|
|
| | | | Endpoint | | |
|
|
| | | | | | |
|
|
| | v | | | |
|
|
| | +-----------------------+ +-------------------- | | |
|
|
| | | Stream | | Stream ... | | |
|
|
| | +-----------------------+ +-------------------- | | |
|
|
| | | | |
|
|
| +------------------------------------------------------------+ +----- |
|
|
| | | |
|
|
| | | |
|
|
| v | |
|
|
| +------------------------------------------------------------+ +----- |
|
|
| | TCP stream | | ... |
|
|
| +------------------------------------------------------------+ +----- |
|
|
| |
|
|
+---------------------------------------------------------------------------------+
|
|
|
|
*/</span></pre></div></div>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|