Update doc

This commit is contained in:
Tatsuhiro Tsujikawa 2014-09-29 00:05:31 +09:00
parent f182020c7e
commit 6bea32e5f9
23 changed files with 1234 additions and 76 deletions

View File

@ -7,7 +7,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>API Reference &mdash; nghttp2 0.6.2-DEV documentation</title>
<title>API Reference &mdash; nghttp2 0.6.2 documentation</title>
@ -28,8 +28,8 @@
<link rel="top" title="nghttp2 0.6.2-DEV documentation" href="index.html"/>
<link rel="next" title="Python API Reference" href="python-apiref.html"/>
<link rel="top" title="nghttp2 0.6.2 documentation" href="index.html"/>
<link rel="next" title="libnghttp2_asio: High level HTTP/2 C++ library" href="libnghttp2_asio.html"/>
<link rel="prev" title="h2load - HTTP/2 benchmarking tool - HOW-TO" href="h2load-howto.html"/>
@ -69,6 +69,7 @@
<li class="toctree-l2"><a class="reference internal" href="package_README.html#client-server-and-proxy-programs">Client, Server and Proxy programs</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#benchmarking-tool">Benchmarking tool</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#hpack-tools">HPACK tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#libnghttp2-asio-high-level-http-2-c-library">libnghttp2_asio: High level HTTP/2 C++ library</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#python-bindings">Python bindings</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#contribution">Contribution</a></li>
</ul>
@ -151,6 +152,10 @@
<li class="toctree-l2"><a class="reference internal" href="#functions">Functions</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="libnghttp2_asio.html">libnghttp2_asio: High level HTTP/2 C++ library</a><ul>
<li class="toctree-l2"><a class="reference internal" href="libnghttp2_asio.html#server-api">Server API</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="python-apiref.html">Python API Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#hpack-api">HPACK API</a></li>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#http-2-servers">HTTP/2 servers</a></li>
@ -158,6 +163,7 @@
</li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2.h.html">nghttp2.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2ver.h.html">nghttp2ver.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="asio_http2.h.html">asio_http2.h</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2">Source</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2/issues">Issues</a></li>
</ul>
@ -2408,8 +2414,7 @@ to the outbound queue.</p>
negative error codes:</p>
<dl class="docutils">
<dt><a class="reference internal" href="#c.NGHTTP2_ERR_INVALID_ARGUMENT" title="NGHTTP2_ERR_INVALID_ARGUMENT"><tt class="xref c c-macro docutils literal"><span class="pre">NGHTTP2_ERR_INVALID_ARGUMENT</span></tt></a></dt>
<dd>The stream does not exist; or no deferred data exist; or data
was deferred by flow control.</dd>
<dd>The stream does not exist; or no deferred data exist.</dd>
<dt><a class="reference internal" href="#c.NGHTTP2_ERR_NOMEM" title="NGHTTP2_ERR_NOMEM"><tt class="xref c c-macro docutils literal"><span class="pre">NGHTTP2_ERR_NOMEM</span></tt></a></dt>
<dd>Out of memory.</dd>
</dl>
@ -3406,7 +3411,7 @@ always succeeds.</p>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="python-apiref.html" class="btn btn-neutral float-right" title="Python API Reference">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="libnghttp2_asio.html" class="btn btn-neutral float-right" title="libnghttp2_asio: High level HTTP/2 C++ library">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="h2load-howto.html" class="btn btn-neutral" title="h2load - HTTP/2 benchmarking tool - HOW-TO"><span class="fa fa-arrow-circle-left"></span> Previous</a>
@ -3438,7 +3443,7 @@ always succeeds.</p>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'0.6.2-DEV',
VERSION:'0.6.2',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: false

511
asio_http2.h.html Normal file
View File

@ -0,0 +1,511 @@
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>asio_http2.h &mdash; nghttp2 0.6.2 documentation</title>
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="top" title="nghttp2 0.6.2 documentation" href="index.html"/>
<link rel="prev" title="nghttp2ver.h" href="nghttp2ver.h.html"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-nav-search">
<a href="index.html" class="fa fa-home"> nghttp2</a>
<div role="search">
<form id ="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="package_README.html">nghttp2 - HTTP/2 C Library</a><ul>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#development-status">Development Status</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#public-test-server">Public Test Server</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#requirements">Requirements</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#build-from-git">Build from git</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#building-documentation">Building documentation</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#client-server-and-proxy-programs">Client, Server and Proxy programs</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#benchmarking-tool">Benchmarking tool</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#hpack-tools">HPACK tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#libnghttp2-asio-high-level-http-2-c-library">libnghttp2_asio: High level HTTP/2 C++ library</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#python-bindings">Python bindings</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#contribution">Contribution</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="building-android-binary.html">Building Android binary</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorial-client.html">Tutorial: HTTP/2 client</a><ul>
<li class="toctree-l2"><a class="reference internal" href="tutorial-client.html#libevent-client-c">libevent-client.c</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="tutorial-server.html">Tutorial: HTTP/2 server</a><ul>
<li class="toctree-l2"><a class="reference internal" href="tutorial-server.html#libevent-server-c">libevent-server.c</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="tutorial-hpack.html">Tutorial: HPACK API</a><ul>
<li class="toctree-l2"><a class="reference internal" href="tutorial-hpack.html#deflating-encoding-headers">Deflating (encoding) headers</a></li>
<li class="toctree-l2"><a class="reference internal" href="tutorial-hpack.html#inflating-decoding-headers">Inflating (decoding) headers</a></li>
<li class="toctree-l2"><a class="reference internal" href="tutorial-hpack.html#deflate-c">deflate.c</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="nghttp.1.html">nghttp(1)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="nghttp.1.html#name">NAME</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttp.1.html#synopsis">SYNOPSIS</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttp.1.html#description">DESCRIPTION</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttp.1.html#options">OPTIONS</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttp.1.html#see-also">SEE ALSO</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="nghttpd.1.html">nghttpd(1)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="nghttpd.1.html#name">NAME</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttpd.1.html#synopsis">SYNOPSIS</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttpd.1.html#description">DESCRIPTION</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttpd.1.html#options">OPTIONS</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttpd.1.html#see-also">SEE ALSO</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="nghttpx.1.html">nghttpx(1)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="nghttpx.1.html#name">NAME</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttpx.1.html#synopsis">SYNOPSIS</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttpx.1.html#description">DESCRIPTION</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttpx.1.html#options">OPTIONS</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttpx.1.html#see-also">SEE ALSO</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="h2load.1.html">h2load(1)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="h2load.1.html#name">NAME</a></li>
<li class="toctree-l2"><a class="reference internal" href="h2load.1.html#synopsis">SYNOPSIS</a></li>
<li class="toctree-l2"><a class="reference internal" href="h2load.1.html#description">DESCRIPTION</a></li>
<li class="toctree-l2"><a class="reference internal" href="h2load.1.html#options">OPTIONS</a></li>
<li class="toctree-l2"><a class="reference internal" href="h2load.1.html#see-also">SEE ALSO</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="nghttpx-howto.html">nghttpx - HTTP/2 proxy - HOW-TO</a><ul>
<li class="toctree-l2"><a class="reference internal" href="nghttpx-howto.html#default-mode">Default mode</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttpx-howto.html#http-2-proxy-mode">HTTP/2 proxy mode</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttpx-howto.html#client-mode">Client mode</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttpx-howto.html#client-proxy-mode">Client proxy mode</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttpx-howto.html#http-2-bridge-mode">HTTP/2 bridge mode</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttpx-howto.html#disable-ssl-tls">Disable SSL/TLS</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttpx-howto.html#specifying-additional-ca-certificate">Specifying additional CA certificate</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttpx-howto.html#read-write-rate-limit">Read/write rate limit</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttpx-howto.html#rewriting-location-header-field">Rewriting location header field</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttpx-howto.html#hot-deploy">Hot deploy</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttpx-howto.html#re-opening-log-files">Re-opening log files</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="h2load-howto.html">h2load - HTTP/2 benchmarking tool - HOW-TO</a><ul>
<li class="toctree-l2"><a class="reference internal" href="h2load-howto.html#basic-usage">Basic Usage</a></li>
<li class="toctree-l2"><a class="reference internal" href="h2load-howto.html#flow-control">Flow Control</a></li>
<li class="toctree-l2"><a class="reference internal" href="h2load-howto.html#multi-threading">Multi-Threading</a></li>
<li class="toctree-l2"><a class="reference internal" href="h2load-howto.html#selecting-protocol-for-clear-text">Selecting protocol for clear text</a></li>
<li class="toctree-l2"><a class="reference internal" href="h2load-howto.html#multiple-uris">Multiple URIs</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="apiref.html">API Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="apiref.html#includes">Includes</a></li>
<li class="toctree-l2"><a class="reference internal" href="apiref.html#remarks">Remarks</a></li>
<li class="toctree-l2"><a class="reference internal" href="apiref.html#macros">Macros</a></li>
<li class="toctree-l2"><a class="reference internal" href="apiref.html#enums">Enums</a></li>
<li class="toctree-l2"><a class="reference internal" href="apiref.html#types-structs-unions-and-typedefs">Types (structs, unions and typedefs)</a></li>
<li class="toctree-l2"><a class="reference internal" href="apiref.html#functions">Functions</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="libnghttp2_asio.html">libnghttp2_asio: High level HTTP/2 C++ library</a><ul>
<li class="toctree-l2"><a class="reference internal" href="libnghttp2_asio.html#server-api">Server API</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="python-apiref.html">Python API Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#hpack-api">HPACK API</a></li>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#http-2-servers">HTTP/2 servers</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2.h.html">nghttp2.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2ver.h.html">nghttp2ver.h</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="">asio_http2.h</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2">Source</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2/issues">Issues</a></li>
</ul>
</div>
&nbsp;
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">nghttp2</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> &raquo;</li>
<li>asio_http2.h</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document">
<div class="section" id="asio-http2-h">
<h1>asio_http2.h<a class="headerlink" href="#asio-http2-h" title="Permalink to this headline"></a></h1>
<div class="highlight-c"><div class="highlight"><pre><span class="cm">/*</span>
<span class="cm"> * nghttp2 - HTTP/2 C Library</span>
<span class="cm"> *</span>
<span class="cm"> * Copyright (c) 2014 Tatsuhiro Tsujikawa</span>
<span class="cm"> *</span>
<span class="cm"> * Permission is hereby granted, free of charge, to any person obtaining</span>
<span class="cm"> * a copy of this software and associated documentation files (the</span>
<span class="cm"> * &quot;Software&quot;), to deal in the Software without restriction, including</span>
<span class="cm"> * without limitation the rights to use, copy, modify, merge, publish,</span>
<span class="cm"> * distribute, sublicense, and/or sell copies of the Software, and to</span>
<span class="cm"> * permit persons to whom the Software is furnished to do so, subject to</span>
<span class="cm"> * the following conditions:</span>
<span class="cm"> *</span>
<span class="cm"> * The above copyright notice and this permission notice shall be</span>
<span class="cm"> * included in all copies or substantial portions of the Software.</span>
<span class="cm"> *</span>
<span class="cm"> * THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND,</span>
<span class="cm"> * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF</span>
<span class="cm"> * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND</span>
<span class="cm"> * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE</span>
<span class="cm"> * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION</span>
<span class="cm"> * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION</span>
<span class="cm"> * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</span>
<span class="cm"> */</span>
<span class="cp">#ifndef ASIO_HTTP2_H</span>
<span class="cp">#define ASIO_HTTP2_H</span>
<span class="cp">#include &lt;cstdint&gt;</span>
<span class="cp">#include &lt;memory&gt;</span>
<span class="cp">#include &lt;string&gt;</span>
<span class="cp">#include &lt;vector&gt;</span>
<span class="cp">#include &lt;functional&gt;</span>
<span class="n">namespace</span> <span class="n">nghttp2</span> <span class="p">{</span>
<span class="n">namespace</span> <span class="n">asio_http2</span> <span class="p">{</span>
<span class="k">struct</span> <span class="n">header</span> <span class="p">{</span>
<span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">name</span><span class="p">;</span>
<span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">value</span><span class="p">;</span>
<span class="p">};</span>
<span class="k">typedef</span> <span class="n">std</span><span class="o">::</span><span class="n">function</span><span class="o">&lt;</span><span class="kt">void</span><span class="p">(</span><span class="k">const</span> <span class="kt">uint8_t</span><span class="o">*</span><span class="p">,</span> <span class="n">std</span><span class="o">::</span><span class="kt">size_t</span><span class="p">)</span><span class="o">&gt;</span> <span class="n">data_cb</span><span class="p">;</span>
<span class="k">typedef</span> <span class="n">std</span><span class="o">::</span><span class="n">function</span><span class="o">&lt;</span><span class="kt">void</span><span class="p">(</span><span class="kt">void</span><span class="p">)</span><span class="o">&gt;</span> <span class="n">void_cb</span><span class="p">;</span>
<span class="c1">// Callback function to generate response body. The implementation of</span>
<span class="c1">// this callback must fill at most |len| bytes data to |buf|. The</span>
<span class="c1">// return value is pair of written bytes and bool value indicating</span>
<span class="c1">// that this is the end of the body. If the end of the body was</span>
<span class="c1">// reached, return true. If there is error and application wants to</span>
<span class="c1">// terminate stream, return std::make_pair(-1, false). Returning</span>
<span class="c1">// std::make_pair(0, false) tells the library that don&#39;t call this</span>
<span class="c1">// callback until application calls response::resume(). This is</span>
<span class="c1">// useful when there is no data to send at the moment but there will</span>
<span class="c1">// be more to come in near future.</span>
<span class="k">typedef</span> <span class="n">std</span><span class="o">::</span><span class="n">function</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">pair</span><span class="o">&lt;</span><span class="kt">ssize_t</span><span class="p">,</span> <span class="kt">bool</span><span class="o">&gt;</span>
<span class="p">(</span><span class="kt">uint8_t</span> <span class="o">*</span><span class="n">buf</span><span class="p">,</span> <span class="n">std</span><span class="o">::</span><span class="kt">size_t</span> <span class="n">len</span><span class="p">)</span><span class="o">&gt;</span> <span class="n">read_cb</span><span class="p">;</span>
<span class="n">class</span> <span class="n">channel_impl</span><span class="p">;</span>
<span class="n">class</span> <span class="n">channel</span> <span class="p">{</span>
<span class="nl">public:</span>
<span class="c1">// Application must not call this directly.</span>
<span class="n">channel</span><span class="p">();</span>
<span class="c1">// Schedules the execution of callback |cb| in the same thread where</span>
<span class="c1">// request callback is called. Therefore, it is same to use request</span>
<span class="c1">// or response object in |cb|. The callbacks are executed in the</span>
<span class="c1">// same order they are posted though same channel object if they are</span>
<span class="c1">// posted from the same thread.</span>
<span class="kt">void</span> <span class="nf">post</span><span class="p">(</span><span class="n">void_cb</span> <span class="n">cb</span><span class="p">);</span>
<span class="c1">// Application must not call this directly.</span>
<span class="n">channel_impl</span><span class="o">&amp;</span> <span class="n">impl</span><span class="p">();</span>
<span class="nl">private:</span>
<span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">channel_impl</span><span class="o">&gt;</span> <span class="n">impl_</span><span class="p">;</span>
<span class="p">};</span>
<span class="k">typedef</span> <span class="n">std</span><span class="o">::</span><span class="n">function</span><span class="o">&lt;</span><span class="kt">void</span><span class="p">(</span><span class="n">channel</span><span class="o">&amp;</span><span class="p">)</span><span class="o">&gt;</span> <span class="n">thread_cb</span><span class="p">;</span>
<span class="n">namespace</span> <span class="n">server</span> <span class="p">{</span>
<span class="n">class</span> <span class="n">request_impl</span><span class="p">;</span>
<span class="n">class</span> <span class="n">response_impl</span><span class="p">;</span>
<span class="n">class</span> <span class="n">request</span> <span class="p">{</span>
<span class="nl">public:</span>
<span class="c1">// Application must not call this directly.</span>
<span class="n">request</span><span class="p">();</span>
<span class="c1">// Returns request headers. The pusedo headers, which start with</span>
<span class="c1">// colon (;), are exluced from this list.</span>
<span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">header</span><span class="o">&gt;&amp;</span> <span class="n">headers</span><span class="p">()</span> <span class="k">const</span><span class="p">;</span>
<span class="c1">// Returns method (e.g., GET).</span>
<span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">&amp;</span> <span class="n">method</span><span class="p">()</span> <span class="k">const</span><span class="p">;</span>
<span class="c1">// Returns scheme (e.g., https).</span>
<span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">&amp;</span> <span class="n">scheme</span><span class="p">()</span> <span class="k">const</span><span class="p">;</span>
<span class="c1">// Returns authority (e.g., example.org). This could be empty</span>
<span class="c1">// string. In this case, check host().</span>
<span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">&amp;</span> <span class="n">authority</span><span class="p">()</span> <span class="k">const</span><span class="p">;</span>
<span class="c1">// Returns host (e.g., example.org). If host header field is not</span>
<span class="c1">// present, this value is copied from authority().</span>
<span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">&amp;</span> <span class="n">host</span><span class="p">()</span> <span class="k">const</span><span class="p">;</span>
<span class="c1">// Returns path (e.g., /index.html).</span>
<span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">&amp;</span> <span class="n">path</span><span class="p">()</span> <span class="k">const</span><span class="p">;</span>
<span class="c1">// Sets callback when chunk of request body is received.</span>
<span class="kt">void</span> <span class="nf">on_data</span><span class="p">(</span><span class="n">data_cb</span> <span class="n">cb</span><span class="p">);</span>
<span class="c1">// Sets callback when request was completed.</span>
<span class="kt">void</span> <span class="nf">on_end</span><span class="p">(</span><span class="n">void_cb</span> <span class="n">cb</span><span class="p">);</span>
<span class="c1">// Pushes resource denoted by |path| using |method|. The additional</span>
<span class="c1">// headers can be given in |headers|. request_cb will be called for</span>
<span class="c1">// pushed resource later on. This function returns true if it</span>
<span class="c1">// succeeds, or false.</span>
<span class="kt">bool</span> <span class="nf">push</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">method</span><span class="p">,</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">path</span><span class="p">,</span>
<span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">header</span><span class="o">&gt;</span> <span class="n">headers</span> <span class="o">=</span> <span class="p">{});</span>
<span class="c1">// Returns true if this is pushed request.</span>
<span class="kt">bool</span> <span class="n">pushed</span><span class="p">()</span> <span class="k">const</span><span class="p">;</span>
<span class="c1">// Returns true if stream has been closed.</span>
<span class="kt">bool</span> <span class="n">closed</span><span class="p">()</span> <span class="k">const</span><span class="p">;</span>
<span class="c1">// Runs function |start| in one of background threads. Returns true</span>
<span class="c1">// if scheduling task was done successfully.</span>
<span class="c1">//</span>
<span class="c1">// Since |start| is called in different thread, calling any method</span>
<span class="c1">// of request or response object in the callback may cause undefined</span>
<span class="c1">// behavior. To safely use them, use channel::post(). A callback</span>
<span class="c1">// passed to channel::post() is executed in the same thread where</span>
<span class="c1">// request callback is called, so it is safe to use request or</span>
<span class="c1">// response object. Example::</span>
<span class="kt">bool</span> <span class="nf">run_task</span><span class="p">(</span><span class="n">thread_cb</span> <span class="n">start</span><span class="p">);</span>
<span class="c1">// Application must not call this directly.</span>
<span class="n">request_impl</span><span class="o">&amp;</span> <span class="n">impl</span><span class="p">();</span>
<span class="nl">private:</span>
<span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">request_impl</span><span class="o">&gt;</span> <span class="n">impl_</span><span class="p">;</span>
<span class="p">};</span>
<span class="n">class</span> <span class="n">response</span> <span class="p">{</span>
<span class="nl">public:</span>
<span class="c1">// Application must not call this directly.</span>
<span class="n">response</span><span class="p">();</span>
<span class="c1">// Write response header using |status_code| (e.g., 200) and</span>
<span class="c1">// additional headers in |headers|.</span>
<span class="kt">void</span> <span class="nf">write_head</span><span class="p">(</span><span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">status_code</span><span class="p">,</span> <span class="n">std</span><span class="o">::</span><span class="n">vector</span><span class="o">&lt;</span><span class="n">header</span><span class="o">&gt;</span> <span class="n">headers</span> <span class="o">=</span> <span class="p">{});</span>
<span class="c1">// Sends |data| as request body. No further call of end() is</span>
<span class="c1">// allowed.</span>
<span class="kt">void</span> <span class="nf">end</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">data</span> <span class="o">=</span> <span class="s">&quot;&quot;</span><span class="p">);</span>
<span class="c1">// Sets callback |cb| as a generator of the response body. No</span>
<span class="c1">// further call of end() is allowed.</span>
<span class="kt">void</span> <span class="nf">end</span><span class="p">(</span><span class="n">read_cb</span> <span class="n">cb</span><span class="p">);</span>
<span class="c1">// Resumes deferred response.</span>
<span class="kt">void</span> <span class="nf">resume</span><span class="p">();</span>
<span class="c1">// Returns status code.</span>
<span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">status_code</span><span class="p">()</span> <span class="k">const</span><span class="p">;</span>
<span class="c1">// Returns true if response has been started.</span>
<span class="kt">bool</span> <span class="n">started</span><span class="p">()</span> <span class="k">const</span><span class="p">;</span>
<span class="c1">// Application must not call this directly.</span>
<span class="n">response_impl</span><span class="o">&amp;</span> <span class="n">impl</span><span class="p">();</span>
<span class="nl">private:</span>
<span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">response_impl</span><span class="o">&gt;</span> <span class="n">impl_</span><span class="p">;</span>
<span class="p">};</span>
<span class="c1">// This is so called request callback. Called every time request is</span>
<span class="c1">// received.</span>
<span class="k">typedef</span> <span class="n">std</span><span class="o">::</span><span class="n">function</span><span class="o">&lt;</span><span class="kt">void</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">request</span><span class="o">&gt;</span><span class="p">,</span>
<span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">response</span><span class="o">&gt;</span><span class="p">)</span><span class="o">&gt;</span> <span class="n">request_cb</span><span class="p">;</span>
<span class="n">class</span> <span class="n">http2_impl</span><span class="p">;</span>
<span class="n">class</span> <span class="n">http2</span> <span class="p">{</span>
<span class="nl">public:</span>
<span class="n">http2</span><span class="p">();</span>
<span class="o">~</span><span class="n">http2</span><span class="p">();</span>
<span class="c1">// Starts listening connection on given address and port. The</span>
<span class="c1">// incoming requests are handled by given callback |cb|.</span>
<span class="kt">void</span> <span class="nf">listen</span><span class="p">(</span><span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">&amp;</span> <span class="n">address</span><span class="p">,</span> <span class="kt">uint16_t</span> <span class="n">port</span><span class="p">,</span>
<span class="n">request_cb</span> <span class="n">cb</span><span class="p">);</span>
<span class="c1">// Sets number of native threads to handle incoming HTTP request.</span>
<span class="c1">// It defaults to 1.</span>
<span class="kt">void</span> <span class="nf">num_threads</span><span class="p">(</span><span class="kt">size_t</span> <span class="n">num_threads</span><span class="p">);</span>
<span class="c1">// Sets TLS private key file and certificate file. Both files must</span>
<span class="c1">// be in PEM format.</span>
<span class="kt">void</span> <span class="nf">tls</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">private_key_file</span><span class="p">,</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">certificate_file</span><span class="p">);</span>
<span class="c1">// Sets number of background threads to run concurrent tasks (see</span>
<span class="c1">// request::run_task()). It defaults to 1. This is not the number</span>
<span class="c1">// of thread to handle incoming HTTP request. For this purpose, see</span>
<span class="c1">// num_threads().</span>
<span class="kt">void</span> <span class="nf">num_concurrent_tasks</span><span class="p">(</span><span class="kt">size_t</span> <span class="n">num_concurrent_tasks</span><span class="p">);</span>
<span class="nl">private:</span>
<span class="n">std</span><span class="o">::</span><span class="n">unique_ptr</span><span class="o">&lt;</span><span class="n">http2_impl</span><span class="o">&gt;</span> <span class="n">impl_</span><span class="p">;</span>
<span class="p">};</span>
<span class="p">}</span> <span class="c1">// namespace server</span>
<span class="c1">// Convenient function to create function to read file denoted by</span>
<span class="c1">// |path|. This can be passed to response::end().</span>
<span class="n">read_cb</span> <span class="n">file_reader</span><span class="p">(</span><span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">&amp;</span> <span class="n">path</span><span class="p">);</span>
<span class="c1">// Like file_reader(const std::string&amp;), but it takes opened file</span>
<span class="c1">// descriptor. The passed descriptor will be closed when returned</span>
<span class="c1">// function object is destroyed.</span>
<span class="n">read_cb</span> <span class="nf">file_reader_from_fd</span><span class="p">(</span><span class="kt">int</span> <span class="n">fd</span><span class="p">);</span>
<span class="c1">// Validates path so that it does not contain directory traversal</span>
<span class="c1">// vector. Returns true if path is safe. The |path| must start with</span>
<span class="c1">// &quot;/&quot; otherwise returns false. This function should be called after</span>
<span class="c1">// percent-decode was performed.</span>
<span class="kt">bool</span> <span class="nf">check_path</span><span class="p">(</span><span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">&amp;</span> <span class="n">path</span><span class="p">);</span>
<span class="c1">// Performs percent-decode against string |s|.</span>
<span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">percent_decode</span><span class="p">(</span><span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">&amp;</span> <span class="n">s</span><span class="p">);</span>
<span class="c1">// Returns HTTP date representation of current posix time |t|.</span>
<span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">http_date</span><span class="p">(</span><span class="kt">time_t</span> <span class="n">t</span><span class="p">);</span>
<span class="p">}</span> <span class="c1">// namespace asio_http2</span>
<span class="p">}</span> <span class="c1">// namespace nghttp2</span>
<span class="cp">#endif </span><span class="c1">// ASIO_HTTP2_H</span>
</pre></div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="nghttp2ver.h.html" class="btn btn-neutral" title="nghttp2ver.h"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2012, 2014, Tatsuhiro Tsujikawa.
</p>
</div>
<a href="https://github.com/snide/sphinx_rtd_theme">Sphinx theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'0.6.2',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: false
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>

View File

@ -7,7 +7,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Building Android binary &mdash; nghttp2 0.6.2-DEV documentation</title>
<title>Building Android binary &mdash; nghttp2 0.6.2 documentation</title>
@ -28,7 +28,7 @@
<link rel="top" title="nghttp2 0.6.2-DEV documentation" href="index.html"/>
<link rel="top" title="nghttp2 0.6.2 documentation" href="index.html"/>
<link rel="next" title="Tutorial: HTTP/2 client" href="tutorial-client.html"/>
<link rel="prev" title="nghttp2 - HTTP/2 C Library" href="package_README.html"/>
@ -69,6 +69,7 @@
<li class="toctree-l2"><a class="reference internal" href="package_README.html#client-server-and-proxy-programs">Client, Server and Proxy programs</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#benchmarking-tool">Benchmarking tool</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#hpack-tools">HPACK tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#libnghttp2-asio-high-level-http-2-c-library">libnghttp2_asio: High level HTTP/2 C++ library</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#python-bindings">Python bindings</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#contribution">Contribution</a></li>
</ul>
@ -151,6 +152,10 @@
<li class="toctree-l2"><a class="reference internal" href="apiref.html#functions">Functions</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="libnghttp2_asio.html">libnghttp2_asio: High level HTTP/2 C++ library</a><ul>
<li class="toctree-l2"><a class="reference internal" href="libnghttp2_asio.html#server-api">Server API</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="python-apiref.html">Python API Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#hpack-api">HPACK API</a></li>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#http-2-servers">HTTP/2 servers</a></li>
@ -158,6 +163,7 @@
</li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2.h.html">nghttp2.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2ver.h.html">nghttp2ver.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="asio_http2.h.html">asio_http2.h</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2">Source</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2/issues">Issues</a></li>
</ul>
@ -207,8 +213,7 @@ for <tt class="docutils literal"><span class="pre">ANDROID_HOME</span></tt>. Fo
unpacked:</p>
<div class="highlight-c"><div class="highlight"><pre>$ build/tools/make-standalone-toolchain.sh \
--install-dir=$ANDROID_HOME/toolchain \
--toolchain=arm-linux-androideabi-4.8 \
--llvm-version=3.4
--toolchain=arm-linux-androideabi-4.8
</pre></div>
</div>
<p>The additional flag <tt class="docutils literal"><span class="pre">--system=linux-x86_64</span></tt> may be required if you
@ -343,7 +348,7 @@ using the following command:</p>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'0.6.2-DEV',
VERSION:'0.6.2',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: false

View File

@ -8,7 +8,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Index &mdash; nghttp2 0.6.2-DEV documentation</title>
<title>Index &mdash; nghttp2 0.6.2 documentation</title>
@ -29,7 +29,7 @@
<link rel="top" title="nghttp2 0.6.2-DEV documentation" href="index.html"/>
<link rel="top" title="nghttp2 0.6.2 documentation" href="index.html"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
@ -68,6 +68,7 @@
<li class="toctree-l2"><a class="reference internal" href="package_README.html#client-server-and-proxy-programs">Client, Server and Proxy programs</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#benchmarking-tool">Benchmarking tool</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#hpack-tools">HPACK tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#libnghttp2-asio-high-level-http-2-c-library">libnghttp2_asio: High level HTTP/2 C++ library</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#python-bindings">Python bindings</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#contribution">Contribution</a></li>
</ul>
@ -150,6 +151,10 @@
<li class="toctree-l2"><a class="reference internal" href="apiref.html#functions">Functions</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="libnghttp2_asio.html">libnghttp2_asio: High level HTTP/2 C++ library</a><ul>
<li class="toctree-l2"><a class="reference internal" href="libnghttp2_asio.html#server-api">Server API</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="python-apiref.html">Python API Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#hpack-api">HPACK API</a></li>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#http-2-servers">HTTP/2 servers</a></li>
@ -157,6 +162,7 @@
</li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2.h.html">nghttp2.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2ver.h.html">nghttp2ver.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="asio_http2.h.html">asio_http2.h</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2">Source</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2/issues">Issues</a></li>
</ul>
@ -3476,7 +3482,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'0.6.2-DEV',
VERSION:'0.6.2',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: false

View File

@ -7,7 +7,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>h2load - HTTP/2 benchmarking tool - HOW-TO &mdash; nghttp2 0.6.2-DEV documentation</title>
<title>h2load - HTTP/2 benchmarking tool - HOW-TO &mdash; nghttp2 0.6.2 documentation</title>
@ -28,7 +28,7 @@
<link rel="top" title="nghttp2 0.6.2-DEV documentation" href="index.html"/>
<link rel="top" title="nghttp2 0.6.2 documentation" href="index.html"/>
<link rel="next" title="API Reference" href="apiref.html"/>
<link rel="prev" title="nghttpx - HTTP/2 proxy - HOW-TO" href="nghttpx-howto.html"/>
@ -69,6 +69,7 @@
<li class="toctree-l2"><a class="reference internal" href="package_README.html#client-server-and-proxy-programs">Client, Server and Proxy programs</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#benchmarking-tool">Benchmarking tool</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#hpack-tools">HPACK tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#libnghttp2-asio-high-level-http-2-c-library">libnghttp2_asio: High level HTTP/2 C++ library</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#python-bindings">Python bindings</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#contribution">Contribution</a></li>
</ul>
@ -151,6 +152,10 @@
<li class="toctree-l2"><a class="reference internal" href="apiref.html#functions">Functions</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="libnghttp2_asio.html">libnghttp2_asio: High level HTTP/2 C++ library</a><ul>
<li class="toctree-l2"><a class="reference internal" href="libnghttp2_asio.html#server-api">Server API</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="python-apiref.html">Python API Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#hpack-api">HPACK API</a></li>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#http-2-servers">HTTP/2 servers</a></li>
@ -158,6 +163,7 @@
</li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2.h.html">nghttp2.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2ver.h.html">nghttp2ver.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="asio_http2.h.html">asio_http2.h</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2">Source</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2/issues">Issues</a></li>
</ul>
@ -314,7 +320,7 @@ and ignores those parts in the rest of the URIs.</p>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'0.6.2-DEV',
VERSION:'0.6.2',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: false

View File

@ -7,7 +7,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>h2load(1) &mdash; nghttp2 0.6.2-DEV documentation</title>
<title>h2load(1) &mdash; nghttp2 0.6.2 documentation</title>
@ -28,7 +28,7 @@
<link rel="top" title="nghttp2 0.6.2-DEV documentation" href="index.html"/>
<link rel="top" title="nghttp2 0.6.2 documentation" href="index.html"/>
<link rel="next" title="nghttpx - HTTP/2 proxy - HOW-TO" href="nghttpx-howto.html"/>
<link rel="prev" title="nghttpx(1)" href="nghttpx.1.html"/>
@ -69,6 +69,7 @@
<li class="toctree-l2"><a class="reference internal" href="package_README.html#client-server-and-proxy-programs">Client, Server and Proxy programs</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#benchmarking-tool">Benchmarking tool</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#hpack-tools">HPACK tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#libnghttp2-asio-high-level-http-2-c-library">libnghttp2_asio: High level HTTP/2 C++ library</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#python-bindings">Python bindings</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#contribution">Contribution</a></li>
</ul>
@ -151,6 +152,10 @@
<li class="toctree-l2"><a class="reference internal" href="apiref.html#functions">Functions</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="libnghttp2_asio.html">libnghttp2_asio: High level HTTP/2 C++ library</a><ul>
<li class="toctree-l2"><a class="reference internal" href="libnghttp2_asio.html#server-api">Server API</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="python-apiref.html">Python API Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#hpack-api">HPACK API</a></li>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#http-2-servers">HTTP/2 servers</a></li>
@ -158,6 +163,7 @@
</li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2.h.html">nghttp2.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2ver.h.html">nghttp2ver.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="asio_http2.h.html">asio_http2.h</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2">Source</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2/issues">Issues</a></li>
</ul>
@ -335,7 +341,7 @@ Default: h2c-14</p>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'0.6.2-DEV',
VERSION:'0.6.2',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: false

View File

@ -7,7 +7,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>nghttp2 - HTTP/2 C Library &mdash; nghttp2 0.6.2-DEV documentation</title>
<title>nghttp2 - HTTP/2 C Library &mdash; nghttp2 0.6.2 documentation</title>
@ -28,7 +28,7 @@
<link rel="top" title="nghttp2 0.6.2-DEV documentation" href="#"/>
<link rel="top" title="nghttp2 0.6.2 documentation" href="#"/>
<link rel="next" title="nghttp2 - HTTP/2 C Library" href="package_README.html"/>
@ -68,6 +68,7 @@
<li class="toctree-l2"><a class="reference internal" href="package_README.html#client-server-and-proxy-programs">Client, Server and Proxy programs</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#benchmarking-tool">Benchmarking tool</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#hpack-tools">HPACK tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#libnghttp2-asio-high-level-http-2-c-library">libnghttp2_asio: High level HTTP/2 C++ library</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#python-bindings">Python bindings</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#contribution">Contribution</a></li>
</ul>
@ -150,6 +151,10 @@
<li class="toctree-l2"><a class="reference internal" href="apiref.html#functions">Functions</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="libnghttp2_asio.html">libnghttp2_asio: High level HTTP/2 C++ library</a><ul>
<li class="toctree-l2"><a class="reference internal" href="libnghttp2_asio.html#server-api">Server API</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="python-apiref.html">Python API Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#hpack-api">HPACK API</a></li>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#http-2-servers">HTTP/2 servers</a></li>
@ -157,6 +162,7 @@
</li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2.h.html">nghttp2.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2ver.h.html">nghttp2ver.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="asio_http2.h.html">asio_http2.h</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2">Source</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2/issues">Issues</a></li>
</ul>
@ -208,6 +214,7 @@ version 2.</p>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#client-server-and-proxy-programs">Client, Server and Proxy programs</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#benchmarking-tool">Benchmarking tool</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#hpack-tools">HPACK tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#libnghttp2-asio-high-level-http-2-c-library">libnghttp2_asio: High level HTTP/2 C++ library</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#python-bindings">Python bindings</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#contribution">Contribution</a></li>
</ul>
@ -290,6 +297,10 @@ version 2.</p>
<li class="toctree-l2"><a class="reference internal" href="apiref.html#functions">Functions</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="libnghttp2_asio.html">libnghttp2_asio: High level HTTP/2 C++ library</a><ul>
<li class="toctree-l2"><a class="reference internal" href="libnghttp2_asio.html#server-api">Server API</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="python-apiref.html">Python API Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#hpack-api">HPACK API</a></li>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#http-2-servers">HTTP/2 servers</a></li>
@ -297,6 +308,7 @@ version 2.</p>
</li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2.h.html">nghttp2.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2ver.h.html">nghttp2ver.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="asio_http2.h.html">asio_http2.h</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2">Source</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2/issues">Issues</a></li>
</ul>
@ -304,13 +316,7 @@ version 2.</p>
</div>
<div class="section" id="released-versions">
<h1>Released Versions<a class="headerlink" href="#released-versions" title="Permalink to this headline"></a></h1>
<ul class="simple">
<li><a class="reference external" href="released-versions/v0.3.2/">v0.3.2</a> <a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2/releases/tag/v0.3.2">(Download v0.3.2)</a></li>
<li><a class="reference external" href="released-versions/v0.3.1/">v0.3.1</a> <a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2/releases/tag/v0.3.1">(Download v0.3.1)</a></li>
<li><a class="reference external" href="released-versions/v0.3.0/">v0.3.0</a> <a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2/releases/tag/v0.3.0">(Download v0.3.0)</a></li>
<li><a class="reference external" href="released-versions/v0.2.0/">v0.2.0</a> <a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2/releases/tag/v0.2.0">(Download v0.2.0)</a></li>
<li><a class="reference external" href="released-versions/v0.1.0/">v0.1.0</a> <a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2/releases/tag/v0.1.0">(Download v0.1.0)</a></li>
</ul>
<p><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2/releases">https://github.com/tatsuhiro-t/nghttp2/releases</a></p>
<div class="section" id="resources">
<h2>Resources<a class="headerlink" href="#resources" title="Permalink to this headline"></a></h2>
<ul class="simple">
@ -357,7 +363,7 @@ version 2.</p>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'0.6.2-DEV',
VERSION:'0.6.2',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: false

489
libnghttp2_asio.html Normal file
View File

@ -0,0 +1,489 @@
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>libnghttp2_asio: High level HTTP/2 C++ library &mdash; nghttp2 0.6.2 documentation</title>
<link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="top" title="nghttp2 0.6.2 documentation" href="index.html"/>
<link rel="next" title="Python API Reference" href="python-apiref.html"/>
<link rel="prev" title="API Reference" href="apiref.html"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-nav-search">
<a href="index.html" class="fa fa-home"> nghttp2</a>
<div role="search">
<form id ="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="package_README.html">nghttp2 - HTTP/2 C Library</a><ul>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#development-status">Development Status</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#public-test-server">Public Test Server</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#requirements">Requirements</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#build-from-git">Build from git</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#building-documentation">Building documentation</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#client-server-and-proxy-programs">Client, Server and Proxy programs</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#benchmarking-tool">Benchmarking tool</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#hpack-tools">HPACK tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#libnghttp2-asio-high-level-http-2-c-library">libnghttp2_asio: High level HTTP/2 C++ library</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#python-bindings">Python bindings</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#contribution">Contribution</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="building-android-binary.html">Building Android binary</a></li>
<li class="toctree-l1"><a class="reference internal" href="tutorial-client.html">Tutorial: HTTP/2 client</a><ul>
<li class="toctree-l2"><a class="reference internal" href="tutorial-client.html#libevent-client-c">libevent-client.c</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="tutorial-server.html">Tutorial: HTTP/2 server</a><ul>
<li class="toctree-l2"><a class="reference internal" href="tutorial-server.html#libevent-server-c">libevent-server.c</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="tutorial-hpack.html">Tutorial: HPACK API</a><ul>
<li class="toctree-l2"><a class="reference internal" href="tutorial-hpack.html#deflating-encoding-headers">Deflating (encoding) headers</a></li>
<li class="toctree-l2"><a class="reference internal" href="tutorial-hpack.html#inflating-decoding-headers">Inflating (decoding) headers</a></li>
<li class="toctree-l2"><a class="reference internal" href="tutorial-hpack.html#deflate-c">deflate.c</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="nghttp.1.html">nghttp(1)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="nghttp.1.html#name">NAME</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttp.1.html#synopsis">SYNOPSIS</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttp.1.html#description">DESCRIPTION</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttp.1.html#options">OPTIONS</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttp.1.html#see-also">SEE ALSO</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="nghttpd.1.html">nghttpd(1)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="nghttpd.1.html#name">NAME</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttpd.1.html#synopsis">SYNOPSIS</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttpd.1.html#description">DESCRIPTION</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttpd.1.html#options">OPTIONS</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttpd.1.html#see-also">SEE ALSO</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="nghttpx.1.html">nghttpx(1)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="nghttpx.1.html#name">NAME</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttpx.1.html#synopsis">SYNOPSIS</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttpx.1.html#description">DESCRIPTION</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttpx.1.html#options">OPTIONS</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttpx.1.html#see-also">SEE ALSO</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="h2load.1.html">h2load(1)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="h2load.1.html#name">NAME</a></li>
<li class="toctree-l2"><a class="reference internal" href="h2load.1.html#synopsis">SYNOPSIS</a></li>
<li class="toctree-l2"><a class="reference internal" href="h2load.1.html#description">DESCRIPTION</a></li>
<li class="toctree-l2"><a class="reference internal" href="h2load.1.html#options">OPTIONS</a></li>
<li class="toctree-l2"><a class="reference internal" href="h2load.1.html#see-also">SEE ALSO</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="nghttpx-howto.html">nghttpx - HTTP/2 proxy - HOW-TO</a><ul>
<li class="toctree-l2"><a class="reference internal" href="nghttpx-howto.html#default-mode">Default mode</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttpx-howto.html#http-2-proxy-mode">HTTP/2 proxy mode</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttpx-howto.html#client-mode">Client mode</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttpx-howto.html#client-proxy-mode">Client proxy mode</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttpx-howto.html#http-2-bridge-mode">HTTP/2 bridge mode</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttpx-howto.html#disable-ssl-tls">Disable SSL/TLS</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttpx-howto.html#specifying-additional-ca-certificate">Specifying additional CA certificate</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttpx-howto.html#read-write-rate-limit">Read/write rate limit</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttpx-howto.html#rewriting-location-header-field">Rewriting location header field</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttpx-howto.html#hot-deploy">Hot deploy</a></li>
<li class="toctree-l2"><a class="reference internal" href="nghttpx-howto.html#re-opening-log-files">Re-opening log files</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="h2load-howto.html">h2load - HTTP/2 benchmarking tool - HOW-TO</a><ul>
<li class="toctree-l2"><a class="reference internal" href="h2load-howto.html#basic-usage">Basic Usage</a></li>
<li class="toctree-l2"><a class="reference internal" href="h2load-howto.html#flow-control">Flow Control</a></li>
<li class="toctree-l2"><a class="reference internal" href="h2load-howto.html#multi-threading">Multi-Threading</a></li>
<li class="toctree-l2"><a class="reference internal" href="h2load-howto.html#selecting-protocol-for-clear-text">Selecting protocol for clear text</a></li>
<li class="toctree-l2"><a class="reference internal" href="h2load-howto.html#multiple-uris">Multiple URIs</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="apiref.html">API Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="apiref.html#includes">Includes</a></li>
<li class="toctree-l2"><a class="reference internal" href="apiref.html#remarks">Remarks</a></li>
<li class="toctree-l2"><a class="reference internal" href="apiref.html#macros">Macros</a></li>
<li class="toctree-l2"><a class="reference internal" href="apiref.html#enums">Enums</a></li>
<li class="toctree-l2"><a class="reference internal" href="apiref.html#types-structs-unions-and-typedefs">Types (structs, unions and typedefs)</a></li>
<li class="toctree-l2"><a class="reference internal" href="apiref.html#functions">Functions</a></li>
</ul>
</li>
<li class="toctree-l1 current"><a class="current reference internal" href="">libnghttp2_asio: High level HTTP/2 C++ library</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#server-api">Server API</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="python-apiref.html">Python API Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#hpack-api">HPACK API</a></li>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#http-2-servers">HTTP/2 servers</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2.h.html">nghttp2.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2ver.h.html">nghttp2ver.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="asio_http2.h.html">asio_http2.h</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2">Source</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2/issues">Issues</a></li>
</ul>
</div>
&nbsp;
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">nghttp2</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> &raquo;</li>
<li>libnghttp2_asio: High level HTTP/2 C++ library</li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
<div role="main" class="document">
<div class="section" id="libnghttp2-asio-high-level-http-2-c-library">
<h1>libnghttp2_asio: High level HTTP/2 C++ library<a class="headerlink" href="#libnghttp2-asio-high-level-http-2-c-library" title="Permalink to this headline"></a></h1>
<p>libnghttp2_asio is C++ library built on top of libnghttp2 and provides
high level abstraction API to build HTTP/2 applications. It depends
on Boost::ASIO library and OpenSSL. Currently libnghttp2_asio
provides server side API.</p>
<p>libnghttp2_asio is not built by default. Use <tt class="docutils literal"><span class="pre">--enable-asio-lib</span></tt>
configure flag to build libnghttp2_asio. The required Boost libraries
are:</p>
<ul class="simple">
<li>Boost::Asio</li>
<li>Boost::System</li>
<li>Boost::Thread</li>
</ul>
<p>To use libnghttp2_asio, first include following header file:</p>
<div class="highlight-cpp"><div class="highlight"><pre><span class="cp">#include &lt;nghttp2/asio_http2.h&gt;</span>
</pre></div>
</div>
<p>Also take a look at that header file <a class="reference internal" href="asio_http2.h.html"><em>asio_http2.h</em></a>.</p>
<div class="section" id="server-api">
<h2>Server API<a class="headerlink" href="#server-api" title="Permalink to this headline"></a></h2>
<p>Server API is designed to build HTTP/2 server very easily to utilize
C++11 anonymous function and closure. The bare minimum example of
HTTP/2 server looks like this:</p>
<div class="highlight-cpp"><div class="highlight"><pre><span class="cp">#include &lt;nghttp2/asio_http2.h&gt;</span>
<span class="k">using</span> <span class="k">namespace</span> <span class="n">nghttp2</span><span class="o">::</span><span class="n">asio_http2</span><span class="p">;</span>
<span class="k">using</span> <span class="k">namespace</span> <span class="n">nghttp2</span><span class="o">::</span><span class="n">asio_http2</span><span class="o">::</span><span class="n">server</span><span class="p">;</span>
<span class="kt">int</span> <span class="nf">main</span><span class="p">(</span><span class="kt">int</span> <span class="n">argc</span><span class="p">,</span> <span class="kt">char</span><span class="o">*</span> <span class="n">argv</span><span class="p">[])</span>
<span class="p">{</span>
<span class="n">http2</span> <span class="n">server</span><span class="p">;</span>
<span class="n">server</span><span class="p">.</span><span class="n">listen</span>
<span class="p">(</span><span class="s">&quot;*&quot;</span><span class="p">,</span> <span class="mi">3000</span><span class="p">,</span>
<span class="p">[](</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">request</span><span class="o">&gt;</span> <span class="n">req</span><span class="p">,</span> <span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">response</span><span class="o">&gt;</span> <span class="n">res</span><span class="p">)</span>
<span class="p">{</span>
<span class="n">res</span><span class="o">-&gt;</span><span class="n">write_head</span><span class="p">(</span><span class="mi">200</span><span class="p">);</span>
<span class="n">res</span><span class="o">-&gt;</span><span class="n">end</span><span class="p">(</span><span class="s">&quot;hello, world&quot;</span><span class="p">);</span>
<span class="p">});</span>
<span class="p">}</span>
</pre></div>
</div>
<p>First we instantiate <tt class="docutils literal"><span class="pre">nghttp2::asio_http2::server::http2</span></tt> object.
Then call <tt class="docutils literal"><span class="pre">nghttp2::asio_http2::server::http2::listen</span></tt> function with
address and port to listen to and callback function, namely &#8220;request
callback&#8221;, invoked when request arrives.</p>
<p>The <tt class="docutils literal"><span class="pre">req</span></tt> and <tt class="docutils literal"><span class="pre">res</span></tt> represent HTTP request and response
respectively. <tt class="docutils literal"><span class="pre">nghttp2::asio_http2_::server::response::write_head</span></tt>
constructs HTTP response header fields. The first argument is HTTP
status code, in the above example, which is 200. The second argument,
which is omitted in the above example, is additional header fields to
send.</p>
<p><tt class="docutils literal"><span class="pre">nghttp2::asio_http2::server::response::end</span></tt> sends responde body.
In the above example, we send string &#8220;hello, world&#8221;.</p>
<div class="section" id="serving-static-files-and-enabling-ssl-tls">
<h3>Serving static files and enabling SSL/TLS<a class="headerlink" href="#serving-static-files-and-enabling-ssl-tls" title="Permalink to this headline"></a></h3>
<p>In this example, we serve a couple of static files and also enable
SSL/TLS.</p>
<div class="highlight-cpp"><div class="highlight"><pre><span class="cp">#include &lt;nghttp2/asio_http2.h&gt;</span>
<span class="k">using</span> <span class="k">namespace</span> <span class="n">nghttp2</span><span class="o">::</span><span class="n">asio_http2</span><span class="p">;</span>
<span class="k">using</span> <span class="k">namespace</span> <span class="n">nghttp2</span><span class="o">::</span><span class="n">asio_http2</span><span class="o">::</span><span class="n">server</span><span class="p">;</span>
<span class="kt">int</span> <span class="nf">main</span><span class="p">(</span><span class="kt">int</span> <span class="n">argc</span><span class="p">,</span> <span class="kt">char</span><span class="o">*</span> <span class="n">argv</span><span class="p">[])</span>
<span class="p">{</span>
<span class="n">http2</span> <span class="n">server</span><span class="p">;</span>
<span class="n">server</span><span class="p">.</span><span class="n">tls</span><span class="p">(</span><span class="s">&quot;server.key&quot;</span><span class="p">,</span> <span class="s">&quot;server.crt&quot;</span><span class="p">);</span>
<span class="n">server</span><span class="p">.</span><span class="n">listen</span>
<span class="p">(</span><span class="s">&quot;*&quot;</span><span class="p">,</span> <span class="mi">3000</span><span class="p">,</span>
<span class="p">[](</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">request</span><span class="o">&gt;</span> <span class="n">req</span><span class="p">,</span> <span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">response</span><span class="o">&gt;</span> <span class="n">res</span><span class="p">)</span>
<span class="p">{</span>
<span class="k">if</span><span class="p">(</span><span class="n">req</span><span class="o">-&gt;</span><span class="n">path</span><span class="p">()</span> <span class="o">==</span> <span class="s">&quot;/&quot;</span> <span class="o">||</span> <span class="n">req</span><span class="o">-&gt;</span><span class="n">path</span><span class="p">()</span> <span class="o">==</span> <span class="s">&quot;/index.html&quot;</span><span class="p">)</span> <span class="p">{</span>
<span class="n">res</span><span class="o">-&gt;</span><span class="n">write_head</span><span class="p">(</span><span class="mi">200</span><span class="p">);</span>
<span class="n">res</span><span class="o">-&gt;</span><span class="n">end</span><span class="p">(</span><span class="n">file_reader</span><span class="p">(</span><span class="s">&quot;index.html&quot;</span><span class="p">));</span>
<span class="p">}</span> <span class="k">else</span> <span class="p">{</span>
<span class="n">res</span><span class="o">-&gt;</span><span class="n">write_head</span><span class="p">(</span><span class="mi">404</span><span class="p">);</span>
<span class="n">res</span><span class="o">-&gt;</span><span class="n">end</span><span class="p">(</span><span class="s">&quot;&lt;html&gt;&lt;head&gt;&lt;title&gt;404&lt;/title&gt;&lt;/head&gt;&quot;</span>
<span class="s">&quot;&lt;body&gt;404 Not Found&lt;/body&gt;&lt;/html&gt;&quot;</span><span class="p">);</span>
<span class="p">}</span>
<span class="p">});</span>
<span class="p">}</span>
</pre></div>
</div>
<p>Specifying path to private key file and certificate file in
<tt class="docutils literal"><span class="pre">nghttp2::asio_http2::server::http2::tls</span></tt> will enable SSL/TLS. Both
files must be in PEM format.</p>
<p>In the above example, if request path is either &#8220;/&#8221; or &#8220;/index.html&#8221;,
we serve index.html file in the current working directory.
<tt class="docutils literal"><span class="pre">nghttp2::asio_http2::server::response::end</span></tt> has overload to take
function of type <tt class="docutils literal"><span class="pre">nghttp2::asio_http2::read_cb</span></tt> and application pass
its implementation to generate response body. For the convenience,
libnghttp2_asio library provides <tt class="docutils literal"><span class="pre">nghttp2::asio_http2::file_reader</span></tt>
function to generate function to server static file.</p>
</div>
<div class="section" id="server-push">
<h3>Server push<a class="headerlink" href="#server-push" title="Permalink to this headline"></a></h3>
<p>Server push is also supported.</p>
<div class="highlight-cpp"><div class="highlight"><pre><span class="cp">#include &lt;nghttp2/asio_http2.h&gt;</span>
<span class="k">using</span> <span class="k">namespace</span> <span class="n">nghttp2</span><span class="o">::</span><span class="n">asio_http2</span><span class="p">;</span>
<span class="k">using</span> <span class="k">namespace</span> <span class="n">nghttp2</span><span class="o">::</span><span class="n">asio_http2</span><span class="o">::</span><span class="n">server</span><span class="p">;</span>
<span class="kt">int</span> <span class="nf">main</span><span class="p">(</span><span class="kt">int</span> <span class="n">argc</span><span class="p">,</span> <span class="kt">char</span><span class="o">*</span> <span class="n">argv</span><span class="p">[])</span>
<span class="p">{</span>
<span class="n">http2</span> <span class="n">server</span><span class="p">;</span>
<span class="n">server</span><span class="p">.</span><span class="n">tls</span><span class="p">(</span><span class="s">&quot;server.key&quot;</span><span class="p">,</span> <span class="s">&quot;server.crt&quot;</span><span class="p">);</span>
<span class="n">server</span><span class="p">.</span><span class="n">listen</span>
<span class="p">(</span><span class="s">&quot;*&quot;</span><span class="p">,</span> <span class="mi">3000</span><span class="p">,</span>
<span class="p">[](</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">request</span><span class="o">&gt;</span> <span class="n">req</span><span class="p">,</span> <span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">response</span><span class="o">&gt;</span> <span class="n">res</span><span class="p">)</span>
<span class="p">{</span>
<span class="k">if</span><span class="p">(</span><span class="n">req</span><span class="o">-&gt;</span><span class="n">path</span><span class="p">()</span> <span class="o">==</span> <span class="s">&quot;/&quot;</span><span class="p">)</span> <span class="p">{</span>
<span class="n">req</span><span class="o">-&gt;</span><span class="n">push</span><span class="p">(</span><span class="s">&quot;GET&quot;</span><span class="p">,</span> <span class="s">&quot;/my.css&quot;</span><span class="p">);</span>
<span class="n">res</span><span class="o">-&gt;</span><span class="n">write_head</span><span class="p">(</span><span class="mi">200</span><span class="p">);</span>
<span class="n">res</span><span class="o">-&gt;</span><span class="n">end</span><span class="p">(</span><span class="n">file_reader</span><span class="p">(</span><span class="s">&quot;index.html&quot;</span><span class="p">));</span>
<span class="k">return</span><span class="p">;</span>
<span class="p">}</span>
<span class="k">if</span><span class="p">(</span><span class="n">req</span><span class="o">-&gt;</span><span class="n">path</span><span class="p">()</span> <span class="o">==</span> <span class="s">&quot;/my.css&quot;</span><span class="p">)</span> <span class="p">{</span>
<span class="n">res</span><span class="o">-&gt;</span><span class="n">write_head</span><span class="p">(</span><span class="mi">200</span><span class="p">);</span>
<span class="n">res</span><span class="o">-&gt;</span><span class="n">end</span><span class="p">(</span><span class="n">file_reader</span><span class="p">(</span><span class="s">&quot;my.css&quot;</span><span class="p">));</span>
<span class="k">return</span><span class="p">;</span>
<span class="p">}</span>
<span class="n">res</span><span class="o">-&gt;</span><span class="n">write_head</span><span class="p">(</span><span class="mi">404</span><span class="p">);</span>
<span class="n">res</span><span class="o">-&gt;</span><span class="n">end</span><span class="p">(</span><span class="s">&quot;&lt;html&gt;&lt;head&gt;&lt;title&gt;404&lt;/title&gt;&lt;/head&gt;&quot;</span>
<span class="s">&quot;&lt;body&gt;404 Not Found&lt;/body&gt;&lt;/html&gt;&quot;</span><span class="p">);</span>
<span class="p">});</span>
<span class="p">}</span>
</pre></div>
</div>
<p>When client requested &#8220;/&#8221;, we push &#8220;/my.css&#8221;. To push resource, call
<tt class="docutils literal"><span class="pre">nghttp2::asio_http2::server::request::push</span></tt> function with desired
method and path. Later, the callback will be called with the pushed
resource &#8220;/my.css&#8221;.</p>
</div>
<div class="section" id="enable-multi-threading">
<h3>Enable multi-threading<a class="headerlink" href="#enable-multi-threading" title="Permalink to this headline"></a></h3>
<p>Enabling multi-threading is very easy. Just call
<tt class="docutils literal"><span class="pre">nghttp2::asio_http2::server::http2::num_threads</span></tt> function with the
desired number of threads:</p>
<div class="highlight-cpp"><div class="highlight"><pre><span class="n">http2</span> <span class="n">server</span><span class="p">;</span>
<span class="c1">// Use 4 native threads</span>
<span class="n">server</span><span class="p">.</span><span class="n">num_threads</span><span class="p">(</span><span class="mi">4</span><span class="p">);</span>
</pre></div>
</div>
</div>
<div class="section" id="run-blocking-tasks-in-background-thread">
<h3>Run blocking tasks in background thread<a class="headerlink" href="#run-blocking-tasks-in-background-thread" title="Permalink to this headline"></a></h3>
<p>The request callback is called in the same thread where HTTP request
is handled. And many connections shares the same thread, we cannot
directly run blocking tasks in request callback.</p>
<p>To run blocking tasks, use
<tt class="docutils literal"><span class="pre">nghttp2::asio_http2::server::request::run_task</span></tt>. The passed
callback will be executed in the different thread from the thread
where request callback was executed. So application can perform
blocking task there. The example follows:</p>
<div class="highlight-cpp"><div class="highlight"><pre><span class="cp">#include &lt;unistd.h&gt;</span>
<span class="cp">#include &lt;nghttp2/asio_http2.h&gt;</span>
<span class="k">using</span> <span class="k">namespace</span> <span class="n">nghttp2</span><span class="o">::</span><span class="n">asio_http2</span><span class="p">;</span>
<span class="k">using</span> <span class="k">namespace</span> <span class="n">nghttp2</span><span class="o">::</span><span class="n">asio_http2</span><span class="o">::</span><span class="n">server</span><span class="p">;</span>
<span class="kt">int</span> <span class="nf">main</span><span class="p">(</span><span class="kt">int</span> <span class="n">argc</span><span class="p">,</span> <span class="kt">char</span><span class="o">*</span> <span class="n">argv</span><span class="p">[])</span>
<span class="p">{</span>
<span class="n">http2</span> <span class="n">server</span><span class="p">;</span>
<span class="n">server</span><span class="p">.</span><span class="n">num_concurrent_tasks</span><span class="p">(</span><span class="mi">16</span><span class="p">);</span>
<span class="n">server</span><span class="p">.</span><span class="n">listen</span>
<span class="p">(</span><span class="s">&quot;*&quot;</span><span class="p">,</span> <span class="mi">3000</span><span class="p">,</span>
<span class="p">[](</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">request</span><span class="o">&gt;</span> <span class="n">req</span><span class="p">,</span> <span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">response</span><span class="o">&gt;</span> <span class="n">res</span><span class="p">)</span>
<span class="p">{</span>
<span class="n">req</span><span class="o">-&gt;</span><span class="n">run_task</span>
<span class="p">([</span><span class="n">res</span><span class="p">](</span><span class="n">channel</span><span class="o">&amp;</span> <span class="n">channel</span><span class="p">)</span>
<span class="p">{</span>
<span class="c1">// executed in different thread than the thread where</span>
<span class="c1">// request callback was executed.</span>
<span class="c1">// using res directly here is not safe. Capturing it by</span>
<span class="c1">// value is safe because it is std::shared_ptr.</span>
<span class="n">sleep</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span>
<span class="n">channel</span><span class="p">.</span><span class="n">post</span>
<span class="p">([</span><span class="n">res</span><span class="p">]()</span>
<span class="p">{</span>
<span class="c1">// executed in the same thread where request callback</span>
<span class="c1">// was executed.</span>
<span class="n">res</span><span class="o">-&gt;</span><span class="n">write_head</span><span class="p">(</span><span class="mi">200</span><span class="p">);</span>
<span class="n">res</span><span class="o">-&gt;</span><span class="n">end</span><span class="p">(</span><span class="s">&quot;hello, world&quot;</span><span class="p">);</span>
<span class="p">});</span>
<span class="p">});</span>
<span class="p">});</span>
<span class="p">}</span>
</pre></div>
</div>
<p>First we set the number of background threads which run tasks. By
default it is set to 1. In this example, we set it to 16, so at most
16 tasks can be executed concurrently without blocking handling new
requests.</p>
<p>We call <tt class="docutils literal"><span class="pre">req-&gt;run_task()</span></tt> to execute task in background thread. In
the passed callback, we just simply sleeps 1 second. After sleep is
over, we schedule another callback to send response to the client.
Since the callback passed to <tt class="docutils literal"><span class="pre">req-&gt;run_task()</span></tt> is executed in the
different thread from the thread where request callback is called,
using <tt class="docutils literal"><span class="pre">req</span></tt> or <tt class="docutils literal"><span class="pre">res</span></tt> object directly there may cause undefined
behaviour. To avoid this issue, we can use
<tt class="docutils literal"><span class="pre">nghttp2::asio_http2::channel::post</span></tt> by supplying a callback which
in turn get called in the same thread where request callback was
called.</p>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="python-apiref.html" class="btn btn-neutral float-right" title="Python API Reference">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="apiref.html" class="btn btn-neutral" title="API Reference"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2012, 2014, Tatsuhiro Tsujikawa.
</p>
</div>
<a href="https://github.com/snide/sphinx_rtd_theme">Sphinx theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'0.6.2',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: false
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>

View File

@ -7,7 +7,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>nghttp(1) &mdash; nghttp2 0.6.2-DEV documentation</title>
<title>nghttp(1) &mdash; nghttp2 0.6.2 documentation</title>
@ -28,7 +28,7 @@
<link rel="top" title="nghttp2 0.6.2-DEV documentation" href="index.html"/>
<link rel="top" title="nghttp2 0.6.2 documentation" href="index.html"/>
<link rel="next" title="nghttpd(1)" href="nghttpd.1.html"/>
<link rel="prev" title="Tutorial: HPACK API" href="tutorial-hpack.html"/>
@ -69,6 +69,7 @@
<li class="toctree-l2"><a class="reference internal" href="package_README.html#client-server-and-proxy-programs">Client, Server and Proxy programs</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#benchmarking-tool">Benchmarking tool</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#hpack-tools">HPACK tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#libnghttp2-asio-high-level-http-2-c-library">libnghttp2_asio: High level HTTP/2 C++ library</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#python-bindings">Python bindings</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#contribution">Contribution</a></li>
</ul>
@ -151,6 +152,10 @@
<li class="toctree-l2"><a class="reference internal" href="apiref.html#functions">Functions</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="libnghttp2_asio.html">libnghttp2_asio: High level HTTP/2 C++ library</a><ul>
<li class="toctree-l2"><a class="reference internal" href="libnghttp2_asio.html#server-api">Server API</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="python-apiref.html">Python API Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#hpack-api">HPACK API</a></li>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#http-2-servers">HTTP/2 servers</a></li>
@ -158,6 +163,7 @@
</li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2.h.html">nghttp2.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2ver.h.html">nghttp2ver.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="asio_http2.h.html">asio_http2.h</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2">Source</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2/issues">Issues</a></li>
</ul>
@ -421,7 +427,7 @@ padding. Specify 0 to disable padding.</p>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'0.6.2-DEV',
VERSION:'0.6.2',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: false

View File

@ -7,7 +7,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>nghttp2.h &mdash; nghttp2 0.6.2-DEV documentation</title>
<title>nghttp2.h &mdash; nghttp2 0.6.2 documentation</title>
@ -28,7 +28,7 @@
<link rel="top" title="nghttp2 0.6.2-DEV documentation" href="index.html"/>
<link rel="top" title="nghttp2 0.6.2 documentation" href="index.html"/>
<link rel="next" title="nghttp2ver.h" href="nghttp2ver.h.html"/>
<link rel="prev" title="Python API Reference" href="python-apiref.html"/>
@ -69,6 +69,7 @@
<li class="toctree-l2"><a class="reference internal" href="package_README.html#client-server-and-proxy-programs">Client, Server and Proxy programs</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#benchmarking-tool">Benchmarking tool</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#hpack-tools">HPACK tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#libnghttp2-asio-high-level-http-2-c-library">libnghttp2_asio: High level HTTP/2 C++ library</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#python-bindings">Python bindings</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#contribution">Contribution</a></li>
</ul>
@ -151,6 +152,10 @@
<li class="toctree-l2"><a class="reference internal" href="apiref.html#functions">Functions</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="libnghttp2_asio.html">libnghttp2_asio: High level HTTP/2 C++ library</a><ul>
<li class="toctree-l2"><a class="reference internal" href="libnghttp2_asio.html#server-api">Server API</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="python-apiref.html">Python API Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#hpack-api">HPACK API</a></li>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#http-2-servers">HTTP/2 servers</a></li>
@ -158,6 +163,7 @@
</li>
<li class="toctree-l1 current"><a class="current reference internal" href="">nghttp2.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2ver.h.html">nghttp2ver.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="asio_http2.h.html">asio_http2.h</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2">Source</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2/issues">Issues</a></li>
</ul>
@ -2258,8 +2264,7 @@
<span class="cm"> * negative error codes:</span>
<span class="cm"> *</span>
<span class="cm"> * :enum:`NGHTTP2_ERR_INVALID_ARGUMENT`</span>
<span class="cm"> * The stream does not exist; or no deferred data exist; or data</span>
<span class="cm"> * was deferred by flow control.</span>
<span class="cm"> * The stream does not exist; or no deferred data exist.</span>
<span class="cm"> * :enum:`NGHTTP2_ERR_NOMEM`</span>
<span class="cm"> * Out of memory.</span>
<span class="cm"> */</span>
@ -3543,7 +3548,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'0.6.2-DEV',
VERSION:'0.6.2',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: false

View File

@ -7,7 +7,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>nghttp2ver.h &mdash; nghttp2 0.6.2-DEV documentation</title>
<title>nghttp2ver.h &mdash; nghttp2 0.6.2 documentation</title>
@ -28,7 +28,8 @@
<link rel="top" title="nghttp2 0.6.2-DEV documentation" href="index.html"/>
<link rel="top" title="nghttp2 0.6.2 documentation" href="index.html"/>
<link rel="next" title="asio_http2.h" href="asio_http2.h.html"/>
<link rel="prev" title="nghttp2.h" href="nghttp2.h.html"/>
@ -68,6 +69,7 @@
<li class="toctree-l2"><a class="reference internal" href="package_README.html#client-server-and-proxy-programs">Client, Server and Proxy programs</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#benchmarking-tool">Benchmarking tool</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#hpack-tools">HPACK tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#libnghttp2-asio-high-level-http-2-c-library">libnghttp2_asio: High level HTTP/2 C++ library</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#python-bindings">Python bindings</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#contribution">Contribution</a></li>
</ul>
@ -150,6 +152,10 @@
<li class="toctree-l2"><a class="reference internal" href="apiref.html#functions">Functions</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="libnghttp2_asio.html">libnghttp2_asio: High level HTTP/2 C++ library</a><ul>
<li class="toctree-l2"><a class="reference internal" href="libnghttp2_asio.html#server-api">Server API</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="python-apiref.html">Python API Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#hpack-api">HPACK API</a></li>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#http-2-servers">HTTP/2 servers</a></li>
@ -157,6 +163,7 @@
</li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2.h.html">nghttp2.h</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="">nghttp2ver.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="asio_http2.h.html">asio_http2.h</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2">Source</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2/issues">Issues</a></li>
</ul>
@ -224,7 +231,7 @@
<span class="cm"> * @macro</span>
<span class="cm"> * Version number of the nghttp2 library release</span>
<span class="cm"> */</span>
<span class="cp">#define NGHTTP2_VERSION &quot;0.6.2-DEV&quot;</span>
<span class="cp">#define NGHTTP2_VERSION &quot;0.6.2&quot;</span>
<span class="cm">/**</span>
<span class="cm"> * @macro</span>
@ -245,6 +252,8 @@
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="asio_http2.h.html" class="btn btn-neutral float-right" title="asio_http2.h">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="nghttp2.h.html" class="btn btn-neutral" title="nghttp2.h"><span class="fa fa-arrow-circle-left"></span> Previous</a>
@ -275,7 +284,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'0.6.2-DEV',
VERSION:'0.6.2',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: false

View File

@ -7,7 +7,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>nghttpd(1) &mdash; nghttp2 0.6.2-DEV documentation</title>
<title>nghttpd(1) &mdash; nghttp2 0.6.2 documentation</title>
@ -28,7 +28,7 @@
<link rel="top" title="nghttp2 0.6.2-DEV documentation" href="index.html"/>
<link rel="top" title="nghttp2 0.6.2 documentation" href="index.html"/>
<link rel="next" title="nghttpx(1)" href="nghttpx.1.html"/>
<link rel="prev" title="nghttp(1)" href="nghttp.1.html"/>
@ -69,6 +69,7 @@
<li class="toctree-l2"><a class="reference internal" href="package_README.html#client-server-and-proxy-programs">Client, Server and Proxy programs</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#benchmarking-tool">Benchmarking tool</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#hpack-tools">HPACK tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#libnghttp2-asio-high-level-http-2-c-library">libnghttp2_asio: High level HTTP/2 C++ library</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#python-bindings">Python bindings</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#contribution">Contribution</a></li>
</ul>
@ -151,6 +152,10 @@
<li class="toctree-l2"><a class="reference internal" href="apiref.html#functions">Functions</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="libnghttp2_asio.html">libnghttp2_asio: High level HTTP/2 C++ library</a><ul>
<li class="toctree-l2"><a class="reference internal" href="libnghttp2_asio.html#server-api">Server API</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="python-apiref.html">Python API Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#hpack-api">HPACK API</a></li>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#http-2-servers">HTTP/2 servers</a></li>
@ -158,6 +163,7 @@
</li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2.h.html">nghttp2.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2ver.h.html">nghttp2ver.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="asio_http2.h.html">asio_http2.h</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2">Source</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2/issues">Issues</a></li>
</ul>
@ -385,7 +391,7 @@ received.</p>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'0.6.2-DEV',
VERSION:'0.6.2',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: false

View File

@ -7,7 +7,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>nghttpx - HTTP/2 proxy - HOW-TO &mdash; nghttp2 0.6.2-DEV documentation</title>
<title>nghttpx - HTTP/2 proxy - HOW-TO &mdash; nghttp2 0.6.2 documentation</title>
@ -28,7 +28,7 @@
<link rel="top" title="nghttp2 0.6.2-DEV documentation" href="index.html"/>
<link rel="top" title="nghttp2 0.6.2 documentation" href="index.html"/>
<link rel="next" title="h2load - HTTP/2 benchmarking tool - HOW-TO" href="h2load-howto.html"/>
<link rel="prev" title="h2load(1)" href="h2load.1.html"/>
@ -69,6 +69,7 @@
<li class="toctree-l2"><a class="reference internal" href="package_README.html#client-server-and-proxy-programs">Client, Server and Proxy programs</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#benchmarking-tool">Benchmarking tool</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#hpack-tools">HPACK tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#libnghttp2-asio-high-level-http-2-c-library">libnghttp2_asio: High level HTTP/2 C++ library</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#python-bindings">Python bindings</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#contribution">Contribution</a></li>
</ul>
@ -151,6 +152,10 @@
<li class="toctree-l2"><a class="reference internal" href="apiref.html#functions">Functions</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="libnghttp2_asio.html">libnghttp2_asio: High level HTTP/2 C++ library</a><ul>
<li class="toctree-l2"><a class="reference internal" href="libnghttp2_asio.html#server-api">Server API</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="python-apiref.html">Python API Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#hpack-api">HPACK API</a></li>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#http-2-servers">HTTP/2 servers</a></li>
@ -158,6 +163,7 @@
</li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2.h.html">nghttp2.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2ver.h.html">nghttp2ver.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="asio_http2.h.html">asio_http2.h</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2">Source</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2/issues">Issues</a></li>
</ul>
@ -482,7 +488,7 @@ re-open files specified by <tt class="docutils literal"><span class="pre">--acce
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'0.6.2-DEV',
VERSION:'0.6.2',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: false

View File

@ -7,7 +7,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>nghttpx(1) &mdash; nghttp2 0.6.2-DEV documentation</title>
<title>nghttpx(1) &mdash; nghttp2 0.6.2 documentation</title>
@ -28,7 +28,7 @@
<link rel="top" title="nghttp2 0.6.2-DEV documentation" href="index.html"/>
<link rel="top" title="nghttp2 0.6.2 documentation" href="index.html"/>
<link rel="next" title="h2load(1)" href="h2load.1.html"/>
<link rel="prev" title="nghttpd(1)" href="nghttpd.1.html"/>
@ -69,6 +69,7 @@
<li class="toctree-l2"><a class="reference internal" href="package_README.html#client-server-and-proxy-programs">Client, Server and Proxy programs</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#benchmarking-tool">Benchmarking tool</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#hpack-tools">HPACK tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#libnghttp2-asio-high-level-http-2-c-library">libnghttp2_asio: High level HTTP/2 C++ library</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#python-bindings">Python bindings</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#contribution">Contribution</a></li>
</ul>
@ -151,6 +152,10 @@
<li class="toctree-l2"><a class="reference internal" href="apiref.html#functions">Functions</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="libnghttp2_asio.html">libnghttp2_asio: High level HTTP/2 C++ library</a><ul>
<li class="toctree-l2"><a class="reference internal" href="libnghttp2_asio.html#server-api">Server API</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="python-apiref.html">Python API Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#hpack-api">HPACK API</a></li>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#http-2-servers">HTTP/2 servers</a></li>
@ -158,6 +163,7 @@
</li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2.h.html">nghttp2.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2ver.h.html">nghttp2ver.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="asio_http2.h.html">asio_http2.h</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2">Source</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2/issues">Issues</a></li>
</ul>
@ -910,7 +916,7 @@ Default: /etc/nghttpx/nghttpx.conf</p>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'0.6.2-DEV',
VERSION:'0.6.2',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: false

Binary file not shown.

View File

@ -7,7 +7,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>nghttp2 - HTTP/2 C Library &mdash; nghttp2 0.6.2-DEV documentation</title>
<title>nghttp2 - HTTP/2 C Library &mdash; nghttp2 0.6.2 documentation</title>
@ -28,7 +28,7 @@
<link rel="top" title="nghttp2 0.6.2-DEV documentation" href="index.html"/>
<link rel="top" title="nghttp2 0.6.2 documentation" href="index.html"/>
<link rel="next" title="Building Android binary" href="building-android-binary.html"/>
<link rel="prev" title="nghttp2 - HTTP/2 C Library" href="index.html"/>
@ -69,6 +69,7 @@
<li class="toctree-l2"><a class="reference internal" href="#client-server-and-proxy-programs">Client, Server and Proxy programs</a></li>
<li class="toctree-l2"><a class="reference internal" href="#benchmarking-tool">Benchmarking tool</a></li>
<li class="toctree-l2"><a class="reference internal" href="#hpack-tools">HPACK tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="#libnghttp2-asio-high-level-http-2-c-library">libnghttp2_asio: High level HTTP/2 C++ library</a></li>
<li class="toctree-l2"><a class="reference internal" href="#python-bindings">Python bindings</a></li>
<li class="toctree-l2"><a class="reference internal" href="#contribution">Contribution</a></li>
</ul>
@ -151,6 +152,10 @@
<li class="toctree-l2"><a class="reference internal" href="apiref.html#functions">Functions</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="libnghttp2_asio.html">libnghttp2_asio: High level HTTP/2 C++ library</a><ul>
<li class="toctree-l2"><a class="reference internal" href="libnghttp2_asio.html#server-api">Server API</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="python-apiref.html">Python API Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#hpack-api">HPACK API</a></li>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#http-2-servers">HTTP/2 servers</a></li>
@ -158,6 +163,7 @@
</li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2.h.html">nghttp2.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2ver.h.html">nghttp2ver.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="asio_http2.h.html">asio_http2.h</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2">Source</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2/issues">Issues</a></li>
</ul>
@ -201,6 +207,7 @@ library. On top of that, we have implemented HTTP/2 client, server
and proxy. Also we have developed load test/benchmarking tool for
HTTP/2 and SPDY.</p>
<p>HPACK encoding and decoding are available as public API.</p>
<p>The experimental high level C++ library is also available.</p>
<p>We have Python binding of this libary, but we have not covered
everything yet.</p>
<div class="section" id="development-status">
@ -298,6 +305,11 @@ resource) in <tt class="docutils literal"><span class="pre">nghttp</span></tt>,
<ul class="simple">
<li>jemalloc</li>
</ul>
<p>libnghttp2_asio C++ library requires the following packages:</p>
<ul class="simple">
<li>libboost-dev &gt;= 1.54.0</li>
<li>libboost-thread-dev &gt;= 1.54.0</li>
</ul>
<p>The Python bindings require the following packages:</p>
<ul class="simple">
<li>cython &gt;= 0.19</li>
@ -1134,6 +1146,44 @@ corresponding header set was processed. The format is the same as
<tt class="docutils literal"><span class="pre">deflatehd</span></tt>.</p>
</div>
</div>
<div class="section" id="libnghttp2-asio-high-level-http-2-c-library">
<h2>libnghttp2_asio: High level HTTP/2 C++ library<a class="headerlink" href="#libnghttp2-asio-high-level-http-2-c-library" title="Permalink to this headline"></a></h2>
<p>libnghttp2_asio is C++ library built on top of libnghttp2 and provides
high level abstraction API to build HTTP/2 applications. It depends
on Boost::ASIO library and OpenSSL. Currently libnghttp2_asio
provides server side API.</p>
<p>libnghttp2_asio is not built by default. Use <tt class="docutils literal"><span class="pre">--enable-asio-lib</span></tt>
configure flag to build libnghttp2_asio. The required Boost libraries
are:</p>
<ul class="simple">
<li>Boost::Asio</li>
<li>Boost::System</li>
<li>Boost::Thread</li>
</ul>
<p>Server API is designed to build HTTP/2 server very easily to utilize
C++11 anonymous function and closure. The bare minimum example of
HTTP/2 server looks like this:</p>
<div class="highlight-cpp"><div class="highlight"><pre><span class="cp">#include &lt;nghttp2/asio_http2.h&gt;</span>
<span class="k">using</span> <span class="k">namespace</span> <span class="n">nghttp2</span><span class="o">::</span><span class="n">asio_http2</span><span class="p">;</span>
<span class="k">using</span> <span class="k">namespace</span> <span class="n">nghttp2</span><span class="o">::</span><span class="n">asio_http2</span><span class="o">::</span><span class="n">server</span><span class="p">;</span>
<span class="kt">int</span> <span class="nf">main</span><span class="p">(</span><span class="kt">int</span> <span class="n">argc</span><span class="p">,</span> <span class="kt">char</span><span class="o">*</span> <span class="n">argv</span><span class="p">[])</span>
<span class="p">{</span>
<span class="n">http2</span> <span class="n">server</span><span class="p">;</span>
<span class="n">server</span><span class="p">.</span><span class="n">listen</span>
<span class="p">(</span><span class="s">&quot;*&quot;</span><span class="p">,</span> <span class="mi">3000</span><span class="p">,</span>
<span class="p">[](</span><span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">request</span><span class="o">&gt;</span> <span class="n">req</span><span class="p">,</span> <span class="n">std</span><span class="o">::</span><span class="n">shared_ptr</span><span class="o">&lt;</span><span class="n">response</span><span class="o">&gt;</span> <span class="n">res</span><span class="p">)</span>
<span class="p">{</span>
<span class="n">res</span><span class="o">-&gt;</span><span class="n">write_head</span><span class="p">(</span><span class="mi">200</span><span class="p">);</span>
<span class="n">res</span><span class="o">-&gt;</span><span class="n">end</span><span class="p">(</span><span class="s">&quot;hello, world&quot;</span><span class="p">);</span>
<span class="p">});</span>
<span class="p">}</span>
</pre></div>
</div>
<p>For more details, see the documentation of libnghttp2_asio.</p>
</div>
<div class="section" id="python-bindings">
<h2>Python bindings<a class="headerlink" href="#python-bindings" title="Permalink to this headline"></a></h2>
<p>This <tt class="docutils literal"><span class="pre">python</span></tt> directory contains nghttp2 Python bindings. The
@ -1288,7 +1338,7 @@ full real name when contributing!</p>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'0.6.2-DEV',
VERSION:'0.6.2',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: false

View File

@ -7,7 +7,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Python Module Index &mdash; nghttp2 0.6.2-DEV documentation</title>
<title>Python Module Index &mdash; nghttp2 0.6.2 documentation</title>
@ -28,7 +28,7 @@
<link rel="top" title="nghttp2 0.6.2-DEV documentation" href="index.html"/>
<link rel="top" title="nghttp2 0.6.2 documentation" href="index.html"/>
<script type="text/javascript">
@ -74,6 +74,7 @@
<li class="toctree-l2"><a class="reference internal" href="package_README.html#client-server-and-proxy-programs">Client, Server and Proxy programs</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#benchmarking-tool">Benchmarking tool</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#hpack-tools">HPACK tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#libnghttp2-asio-high-level-http-2-c-library">libnghttp2_asio: High level HTTP/2 C++ library</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#python-bindings">Python bindings</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#contribution">Contribution</a></li>
</ul>
@ -156,6 +157,10 @@
<li class="toctree-l2"><a class="reference internal" href="apiref.html#functions">Functions</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="libnghttp2_asio.html">libnghttp2_asio: High level HTTP/2 C++ library</a><ul>
<li class="toctree-l2"><a class="reference internal" href="libnghttp2_asio.html#server-api">Server API</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="python-apiref.html">Python API Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#hpack-api">HPACK API</a></li>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#http-2-servers">HTTP/2 servers</a></li>
@ -163,6 +168,7 @@
</li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2.h.html">nghttp2.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2ver.h.html">nghttp2ver.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="asio_http2.h.html">asio_http2.h</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2">Source</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2/issues">Issues</a></li>
</ul>
@ -244,7 +250,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'0.6.2-DEV',
VERSION:'0.6.2',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: false

View File

@ -7,7 +7,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Python API Reference &mdash; nghttp2 0.6.2-DEV documentation</title>
<title>Python API Reference &mdash; nghttp2 0.6.2 documentation</title>
@ -28,9 +28,9 @@
<link rel="top" title="nghttp2 0.6.2-DEV documentation" href="index.html"/>
<link rel="top" title="nghttp2 0.6.2 documentation" href="index.html"/>
<link rel="next" title="nghttp2.h" href="nghttp2.h.html"/>
<link rel="prev" title="API Reference" href="apiref.html"/>
<link rel="prev" title="libnghttp2_asio: High level HTTP/2 C++ library" href="libnghttp2_asio.html"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
@ -69,6 +69,7 @@
<li class="toctree-l2"><a class="reference internal" href="package_README.html#client-server-and-proxy-programs">Client, Server and Proxy programs</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#benchmarking-tool">Benchmarking tool</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#hpack-tools">HPACK tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#libnghttp2-asio-high-level-http-2-c-library">libnghttp2_asio: High level HTTP/2 C++ library</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#python-bindings">Python bindings</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#contribution">Contribution</a></li>
</ul>
@ -151,6 +152,10 @@
<li class="toctree-l2"><a class="reference internal" href="apiref.html#functions">Functions</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="libnghttp2_asio.html">libnghttp2_asio: High level HTTP/2 C++ library</a><ul>
<li class="toctree-l2"><a class="reference internal" href="libnghttp2_asio.html#server-api">Server API</a></li>
</ul>
</li>
<li class="toctree-l1 current"><a class="current reference internal" href="">Python API Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#hpack-api">HPACK API</a></li>
<li class="toctree-l2"><a class="reference internal" href="#http-2-servers">HTTP/2 servers</a></li>
@ -158,6 +163,7 @@
</li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2.h.html">nghttp2.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2ver.h.html">nghttp2ver.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="asio_http2.h.html">asio_http2.h</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2">Source</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2/issues">Issues</a></li>
</ul>
@ -542,7 +548,7 @@ encoded using UTF-8.</p>
<a href="nghttp2.h.html" class="btn btn-neutral float-right" title="nghttp2.h">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="apiref.html" class="btn btn-neutral" title="API Reference"><span class="fa fa-arrow-circle-left"></span> Previous</a>
<a href="libnghttp2_asio.html" class="btn btn-neutral" title="libnghttp2_asio: High level HTTP/2 C++ library"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
@ -571,7 +577,7 @@ encoded using UTF-8.</p>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'0.6.2-DEV',
VERSION:'0.6.2',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: false

View File

@ -7,7 +7,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Search &mdash; nghttp2 0.6.2-DEV documentation</title>
<title>Search &mdash; nghttp2 0.6.2 documentation</title>
@ -28,7 +28,7 @@
<link rel="top" title="nghttp2 0.6.2-DEV documentation" href="index.html"/>
<link rel="top" title="nghttp2 0.6.2 documentation" href="index.html"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
@ -67,6 +67,7 @@
<li class="toctree-l2"><a class="reference internal" href="package_README.html#client-server-and-proxy-programs">Client, Server and Proxy programs</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#benchmarking-tool">Benchmarking tool</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#hpack-tools">HPACK tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#libnghttp2-asio-high-level-http-2-c-library">libnghttp2_asio: High level HTTP/2 C++ library</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#python-bindings">Python bindings</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#contribution">Contribution</a></li>
</ul>
@ -149,6 +150,10 @@
<li class="toctree-l2"><a class="reference internal" href="apiref.html#functions">Functions</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="libnghttp2_asio.html">libnghttp2_asio: High level HTTP/2 C++ library</a><ul>
<li class="toctree-l2"><a class="reference internal" href="libnghttp2_asio.html#server-api">Server API</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="python-apiref.html">Python API Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#hpack-api">HPACK API</a></li>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#http-2-servers">HTTP/2 servers</a></li>
@ -156,6 +161,7 @@
</li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2.h.html">nghttp2.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2ver.h.html">nghttp2ver.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="asio_http2.h.html">asio_http2.h</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2">Source</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2/issues">Issues</a></li>
</ul>
@ -232,7 +238,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'0.6.2-DEV',
VERSION:'0.6.2',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: false

File diff suppressed because one or more lines are too long

View File

@ -7,7 +7,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tutorial: HTTP/2 client &mdash; nghttp2 0.6.2-DEV documentation</title>
<title>Tutorial: HTTP/2 client &mdash; nghttp2 0.6.2 documentation</title>
@ -28,7 +28,7 @@
<link rel="top" title="nghttp2 0.6.2-DEV documentation" href="index.html"/>
<link rel="top" title="nghttp2 0.6.2 documentation" href="index.html"/>
<link rel="next" title="Tutorial: HTTP/2 server" href="tutorial-server.html"/>
<link rel="prev" title="Building Android binary" href="building-android-binary.html"/>
@ -69,6 +69,7 @@
<li class="toctree-l2"><a class="reference internal" href="package_README.html#client-server-and-proxy-programs">Client, Server and Proxy programs</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#benchmarking-tool">Benchmarking tool</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#hpack-tools">HPACK tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#libnghttp2-asio-high-level-http-2-c-library">libnghttp2_asio: High level HTTP/2 C++ library</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#python-bindings">Python bindings</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#contribution">Contribution</a></li>
</ul>
@ -151,6 +152,10 @@
<li class="toctree-l2"><a class="reference internal" href="apiref.html#functions">Functions</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="libnghttp2_asio.html">libnghttp2_asio: High level HTTP/2 C++ library</a><ul>
<li class="toctree-l2"><a class="reference internal" href="libnghttp2_asio.html#server-api">Server API</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="python-apiref.html">Python API Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#hpack-api">HPACK API</a></li>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#http-2-servers">HTTP/2 servers</a></li>
@ -158,6 +163,7 @@
</li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2.h.html">nghttp2.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2ver.h.html">nghttp2ver.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="asio_http2.h.html">asio_http2.h</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2">Source</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2/issues">Issues</a></li>
</ul>
@ -1269,7 +1275,7 @@ here.</p>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'0.6.2-DEV',
VERSION:'0.6.2',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: false

View File

@ -7,7 +7,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tutorial: HPACK API &mdash; nghttp2 0.6.2-DEV documentation</title>
<title>Tutorial: HPACK API &mdash; nghttp2 0.6.2 documentation</title>
@ -28,7 +28,7 @@
<link rel="top" title="nghttp2 0.6.2-DEV documentation" href="index.html"/>
<link rel="top" title="nghttp2 0.6.2 documentation" href="index.html"/>
<link rel="next" title="nghttp(1)" href="nghttp.1.html"/>
<link rel="prev" title="Tutorial: HTTP/2 server" href="tutorial-server.html"/>
@ -69,6 +69,7 @@
<li class="toctree-l2"><a class="reference internal" href="package_README.html#client-server-and-proxy-programs">Client, Server and Proxy programs</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#benchmarking-tool">Benchmarking tool</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#hpack-tools">HPACK tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#libnghttp2-asio-high-level-http-2-c-library">libnghttp2_asio: High level HTTP/2 C++ library</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#python-bindings">Python bindings</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#contribution">Contribution</a></li>
</ul>
@ -151,6 +152,10 @@
<li class="toctree-l2"><a class="reference internal" href="apiref.html#functions">Functions</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="libnghttp2_asio.html">libnghttp2_asio: High level HTTP/2 C++ library</a><ul>
<li class="toctree-l2"><a class="reference internal" href="libnghttp2_asio.html#server-api">Server API</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="python-apiref.html">Python API Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#hpack-api">HPACK API</a></li>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#http-2-servers">HTTP/2 servers</a></li>
@ -158,6 +163,7 @@
</li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2.h.html">nghttp2.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2ver.h.html">nghttp2ver.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="asio_http2.h.html">asio_http2.h</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2">Source</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2/issues">Issues</a></li>
</ul>
@ -562,7 +568,7 @@ function.</p>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'0.6.2-DEV',
VERSION:'0.6.2',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: false

View File

@ -7,7 +7,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tutorial: HTTP/2 server &mdash; nghttp2 0.6.2-DEV documentation</title>
<title>Tutorial: HTTP/2 server &mdash; nghttp2 0.6.2 documentation</title>
@ -28,7 +28,7 @@
<link rel="top" title="nghttp2 0.6.2-DEV documentation" href="index.html"/>
<link rel="top" title="nghttp2 0.6.2 documentation" href="index.html"/>
<link rel="next" title="Tutorial: HPACK API" href="tutorial-hpack.html"/>
<link rel="prev" title="Tutorial: HTTP/2 client" href="tutorial-client.html"/>
@ -69,6 +69,7 @@
<li class="toctree-l2"><a class="reference internal" href="package_README.html#client-server-and-proxy-programs">Client, Server and Proxy programs</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#benchmarking-tool">Benchmarking tool</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#hpack-tools">HPACK tools</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#libnghttp2-asio-high-level-http-2-c-library">libnghttp2_asio: High level HTTP/2 C++ library</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#python-bindings">Python bindings</a></li>
<li class="toctree-l2"><a class="reference internal" href="package_README.html#contribution">Contribution</a></li>
</ul>
@ -151,6 +152,10 @@
<li class="toctree-l2"><a class="reference internal" href="apiref.html#functions">Functions</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="libnghttp2_asio.html">libnghttp2_asio: High level HTTP/2 C++ library</a><ul>
<li class="toctree-l2"><a class="reference internal" href="libnghttp2_asio.html#server-api">Server API</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="python-apiref.html">Python API Reference</a><ul>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#hpack-api">HPACK API</a></li>
<li class="toctree-l2"><a class="reference internal" href="python-apiref.html#http-2-servers">HTTP/2 servers</a></li>
@ -158,6 +163,7 @@
</li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2.h.html">nghttp2.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="nghttp2ver.h.html">nghttp2ver.h</a></li>
<li class="toctree-l1"><a class="reference internal" href="asio_http2.h.html">asio_http2.h</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2">Source</a></li>
<li class="toctree-l1"><a class="reference external" href="https://github.com/tatsuhiro-t/nghttp2/issues">Issues</a></li>
</ul>
@ -1560,7 +1566,7 @@ is about to close and we no longer use that object.</p>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'0.6.2-DEV',
VERSION:'0.6.2',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: false