Update doc
This commit is contained in:
parent
9b03a75ddd
commit
f182020c7e
|
@ -1 +1,2 @@
|
|||
.fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-weight:normal;font-style:normal;src:url("../font/fontawesome_webfont.eot");src:url("../font/fontawesome_webfont.eot?#iefix") format("embedded-opentype"),url("../font/fontawesome_webfont.woff") format("woff"),url("../font/fontawesome_webfont.ttf") format("truetype"),url("../font/fontawesome_webfont.svg#FontAwesome") format("svg")}.fa:before{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;text-decoration:inherit}a .fa{display:inline-block;text-decoration:inherit}li .fa{display:inline-block}li .fa-large:before,li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-0.8em}ul.fas li .fa{width:0.8em}ul.fas li .fa-large:before,ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before{content:"\f02d"}.icon-book:before{content:"\f02d"}.fa-caret-down:before{content:"\f0d7"}.icon-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.icon-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.icon-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;border-top:solid 10px #343131;font-family:"Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60;*zoom:1}.rst-versions .rst-current-version:before,.rst-versions .rst-current-version:after{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book{float:left}.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:gray;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:solid 1px #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px}.rst-versions.rst-badge .icon-book{float:none}.rst-versions.rst-badge .fa-book{float:none}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book{float:left}.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge .rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width: 768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}img{width:100%;height:auto}}
|
||||
.fa:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:FontAwesome;font-weight:normal;font-style:normal;src:url("../font/fontawesome_webfont.eot");src:url("../font/fontawesome_webfont.eot?#iefix") format("embedded-opentype"),url("../font/fontawesome_webfont.woff") format("woff"),url("../font/fontawesome_webfont.ttf") format("truetype"),url("../font/fontawesome_webfont.svg#FontAwesome") format("svg")}.fa:before{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;text-decoration:inherit}a .fa{display:inline-block;text-decoration:inherit}li .fa{display:inline-block}li .fa-large:before,li .fa-large:before{width:1.875em}ul.fas{list-style-type:none;margin-left:2em;text-indent:-0.8em}ul.fas li .fa{width:0.8em}ul.fas li .fa-large:before,ul.fas li .fa-large:before{vertical-align:baseline}.fa-book:before{content:""}.icon-book:before{content:""}.fa-caret-down:before{content:""}.icon-caret-down:before{content:""}.fa-caret-up:before{content:""}.icon-caret-up:before{content:""}.fa-caret-left:before{content:""}.icon-caret-left:before{content:""}.fa-caret-right:before{content:""}.icon-caret-right:before{content:""}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;border-top:solid 10px #343131;font-family:"Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;z-index:400}.rst-versions a{color:#2980B9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27AE60;*zoom:1}.rst-versions .rst-current-version:before,.rst-versions .rst-current-version:after{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-versions .rst-current-version .fa{color:#fcfcfc}.rst-versions .rst-current-version .fa-book{float:left}.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#E74C3C;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#F1C40F;color:#000}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:gray;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:solid 1px #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px}.rst-versions.rst-badge .icon-book{float:none}.rst-versions.rst-badge .fa-book{float:none}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .fa-book{float:left}.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge .rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width: 768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}img{width:100%;height:auto}}
|
||||
/*# sourceMappingURL=badge_only.css.map */
|
||||
|
|
File diff suppressed because one or more lines are too long
74
apiref.html
74
apiref.html
|
@ -7,14 +7,14 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>API Reference — nghttp2 0.6.0-DEV documentation</title>
|
||||
<title>API Reference — nghttp2 0.6.2-DEV documentation</title>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
|
||||
<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'>
|
||||
|
||||
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
|||
|
||||
|
||||
|
||||
<link rel="top" title="nghttp2 0.6.0-DEV documentation" href="index.html"/>
|
||||
<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="prev" title="h2load - HTTP/2 benchmarking tool - HOW-TO" href="h2load-howto.html"/>
|
||||
|
||||
|
@ -44,7 +44,9 @@
|
|||
|
||||
<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>
|
||||
|
||||
<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" />
|
||||
|
@ -188,7 +190,7 @@
|
|||
</ul>
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main">
|
||||
<div role="main" class="document">
|
||||
|
||||
<div class="section" id="api-reference">
|
||||
<h1>API Reference<a class="headerlink" href="#api-reference" title="Permalink to this headline">¶</a></h1>
|
||||
|
@ -587,6 +589,14 @@ Out of memory. This is a fatal error.</p>
|
|||
The user callback function failed. This is a fatal error.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="macro">
|
||||
<dt id="c.NGHTTP2_ERR_BAD_PREFACE">
|
||||
<tt class="descname">NGHTTP2_ERR_BAD_PREFACE</tt><a class="headerlink" href="#c.NGHTTP2_ERR_BAD_PREFACE" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>(<tt class="docutils literal"><span class="pre">-903</span></tt>)
|
||||
Invalid connection preface was received and further processing is
|
||||
not possible.</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="type">
|
||||
|
@ -1097,6 +1107,13 @@ uint8_t <tt class="descname">flags</tt><a class="headerlink" href="#c.nghttp2_fr
|
|||
<dd><p>The flags.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="member">
|
||||
<dt id="c.nghttp2_frame_hd.reserved">
|
||||
uint8_t <tt class="descname">reserved</tt><a class="headerlink" href="#c.nghttp2_frame_hd.reserved" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Reserved bit in frame header. Currently, this is always set to 0
|
||||
and application should not expect something useful in here.</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="type">
|
||||
|
@ -1357,6 +1374,13 @@ int32_t <tt class="descname">promised_stream_id</tt><a class="headerlink" href="
|
|||
<dd><p>The promised stream ID</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="member">
|
||||
<dt id="c.nghttp2_push_promise.reserved">
|
||||
uint8_t <tt class="descname">reserved</tt><a class="headerlink" href="#c.nghttp2_push_promise.reserved" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Reserved bit. Currently this is always set to 0 and application
|
||||
should not expect something useful in here.</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="type">
|
||||
|
@ -1411,6 +1435,13 @@ size_t <tt class="descname">opaque_data_len</tt><a class="headerlink" href="#c.n
|
|||
<dd><p>The length of <em>opaque_data</em> member.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="member">
|
||||
<dt id="c.nghttp2_goaway.reserved">
|
||||
uint8_t <tt class="descname">reserved</tt><a class="headerlink" href="#c.nghttp2_goaway.reserved" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Reserved bit. Currently this is always set to 0 and application
|
||||
should not expect something useful in here.</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="type">
|
||||
|
@ -1429,6 +1460,13 @@ int32_t <tt class="descname">window_size_increment</tt><a class="headerlink" hre
|
|||
<dd><p>The window size increment.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="member">
|
||||
<dt id="c.nghttp2_window_update.reserved">
|
||||
uint8_t <tt class="descname">reserved</tt><a class="headerlink" href="#c.nghttp2_window_update.reserved" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Reserved bit. Currently this is always set to 0 and application
|
||||
should not expect something useful in here.</p>
|
||||
</dd></dl>
|
||||
|
||||
</dd></dl>
|
||||
|
||||
<dl class="type">
|
||||
|
@ -2102,6 +2140,22 @@ overwritten if the local endpoint receives
|
|||
SETTINGS_MAX_CONCURRENT_STREAMS from the remote endpoint.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="function">
|
||||
<dt id="c.nghttp2_option_set_recv_client_preface">
|
||||
void <tt class="descname">nghttp2_option_set_recv_client_preface</tt><big>(</big><a class="reference internal" href="#c.nghttp2_option" title="nghttp2_option">nghttp2_option</a><em> *option</em>, int<em> val</em><big>)</big><a class="headerlink" href="#c.nghttp2_option_set_recv_client_preface" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>By default, nghttp2 library only handles HTTP/2 frames and does not
|
||||
recognize first 24 bytes of client connection preface. This design
|
||||
choice is done due to the fact that server may want to detect the
|
||||
application protocol based on first few bytes on clear text
|
||||
communication. But for simple servers which only speak HTTP/2, it
|
||||
is easier for developers if nghttp2 library takes care of client
|
||||
connection preface.</p>
|
||||
<p>If this option is used with nonzero <em>val</em>, nghttp2 library checks
|
||||
first 24 bytes client connection preface. If it is not a valid
|
||||
one, <a class="reference internal" href="#c.nghttp2_session_recv" title="nghttp2_session_recv"><tt class="xref c c-func docutils literal"><span class="pre">nghttp2_session_recv()</span></tt></a> and <a class="reference internal" href="#c.nghttp2_session_mem_recv" title="nghttp2_session_mem_recv"><tt class="xref c c-func docutils literal"><span class="pre">nghttp2_session_mem_recv()</span></tt></a> will
|
||||
return error <a class="reference internal" href="#c.NGHTTP2_ERR_BAD_PREFACE" title="NGHTTP2_ERR_BAD_PREFACE"><tt class="xref c c-macro docutils literal"><span class="pre">NGHTTP2_ERR_BAD_PREFACE</span></tt></a>, which is fatal error.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="function">
|
||||
<dt id="c.nghttp2_session_client_new">
|
||||
int <tt class="descname">nghttp2_session_client_new</tt><big>(</big><a class="reference internal" href="#c.nghttp2_session" title="nghttp2_session">nghttp2_session</a><em> **session_ptr</em>, const <a class="reference internal" href="#c.nghttp2_session_callbacks" title="nghttp2_session_callbacks">nghttp2_session_callbacks</a><em> *callbacks</em>, void<em> *user_data</em><big>)</big><a class="headerlink" href="#c.nghttp2_session_client_new" title="Permalink to this definition">¶</a></dt>
|
||||
|
@ -2306,6 +2360,10 @@ negative error codes:</p>
|
|||
<dd>Out of memory.</dd>
|
||||
<dt><a class="reference internal" href="#c.NGHTTP2_ERR_CALLBACK_FAILURE" title="NGHTTP2_ERR_CALLBACK_FAILURE"><tt class="xref c c-macro docutils literal"><span class="pre">NGHTTP2_ERR_CALLBACK_FAILURE</span></tt></a></dt>
|
||||
<dd>The callback function failed.</dd>
|
||||
<dt><a class="reference internal" href="#c.NGHTTP2_ERR_BAD_PREFACE" title="NGHTTP2_ERR_BAD_PREFACE"><tt class="xref c c-macro docutils literal"><span class="pre">NGHTTP2_ERR_BAD_PREFACE</span></tt></a></dt>
|
||||
<dd>Invalid client preface was detected. This error only returns
|
||||
when <em>session</em> was configured as server and
|
||||
<a class="reference internal" href="#c.nghttp2_option_set_recv_client_preface" title="nghttp2_option_set_recv_client_preface"><tt class="xref c c-func docutils literal"><span class="pre">nghttp2_option_set_recv_client_preface()</span></tt></a> is used.</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
|
@ -2334,6 +2392,10 @@ following negative error codes:</p>
|
|||
<dd>Out of memory.</dd>
|
||||
<dt><a class="reference internal" href="#c.NGHTTP2_ERR_CALLBACK_FAILURE" title="NGHTTP2_ERR_CALLBACK_FAILURE"><tt class="xref c c-macro docutils literal"><span class="pre">NGHTTP2_ERR_CALLBACK_FAILURE</span></tt></a></dt>
|
||||
<dd>The callback function failed.</dd>
|
||||
<dt><a class="reference internal" href="#c.NGHTTP2_ERR_BAD_PREFACE" title="NGHTTP2_ERR_BAD_PREFACE"><tt class="xref c c-macro docutils literal"><span class="pre">NGHTTP2_ERR_BAD_PREFACE</span></tt></a></dt>
|
||||
<dd>Invalid client preface was detected. This error only returns
|
||||
when <em>session</em> was configured as server and
|
||||
<a class="reference internal" href="#c.nghttp2_option_set_recv_client_preface" title="nghttp2_option_set_recv_client_preface"><tt class="xref c c-func docutils literal"><span class="pre">nghttp2_option_set_recv_client_preface()</span></tt></a> is used.</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
|
@ -3376,7 +3438,7 @@ always succeeds.</p>
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'0.6.0-DEV',
|
||||
VERSION:'0.6.2-DEV',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
HAS_SOURCE: false
|
||||
|
|
|
@ -7,14 +7,14 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Building Android binary — nghttp2 0.6.0-DEV documentation</title>
|
||||
<title>Building Android binary — nghttp2 0.6.2-DEV documentation</title>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
|
||||
<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'>
|
||||
|
||||
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
|||
|
||||
|
||||
|
||||
<link rel="top" title="nghttp2 0.6.0-DEV documentation" href="index.html"/>
|
||||
<link rel="top" title="nghttp2 0.6.2-DEV 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"/>
|
||||
|
||||
|
@ -44,7 +44,9 @@
|
|||
|
||||
<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>
|
||||
|
||||
<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" />
|
||||
|
@ -188,7 +190,7 @@
|
|||
</ul>
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main">
|
||||
<div role="main" class="document">
|
||||
|
||||
<div class="section" id="building-android-binary">
|
||||
<h1>Building Android binary<a class="headerlink" href="#building-android-binary" title="Permalink to this headline">¶</a></h1>
|
||||
|
@ -341,7 +343,7 @@ using the following command:</p>
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'0.6.0-DEV',
|
||||
VERSION:'0.6.2-DEV',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
HAS_SOURCE: false
|
||||
|
|
117
genindex.html
117
genindex.html
|
@ -8,14 +8,14 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Index — nghttp2 0.6.0-DEV documentation</title>
|
||||
<title>Index — nghttp2 0.6.2-DEV documentation</title>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
|
||||
<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'>
|
||||
|
||||
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
|||
|
||||
|
||||
|
||||
<link rel="top" title="nghttp2 0.6.0-DEV documentation" href="index.html"/>
|
||||
<link rel="top" title="nghttp2 0.6.2-DEV documentation" href="index.html"/>
|
||||
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
|
||||
|
@ -43,7 +43,9 @@
|
|||
|
||||
<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>
|
||||
|
||||
<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" />
|
||||
|
@ -187,7 +189,7 @@
|
|||
</ul>
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main">
|
||||
<div role="main" class="document">
|
||||
|
||||
|
||||
<h1 id="index">Index</h1>
|
||||
|
@ -671,6 +673,17 @@
|
|||
|
||||
</dl></dd>
|
||||
|
||||
<dt>
|
||||
--listener-disable-timeout=<SEC>
|
||||
</dt>
|
||||
|
||||
<dd><dl>
|
||||
|
||||
<dt><a href="nghttpx.1.html#cmdoption-nghttpx--listener-disable-timeout">nghttpx command line option</a>
|
||||
</dt>
|
||||
|
||||
</dl></dd>
|
||||
|
||||
<dt>
|
||||
--no-content-length
|
||||
</dt>
|
||||
|
@ -759,6 +772,28 @@
|
|||
|
||||
</dl></dd>
|
||||
|
||||
<dt>
|
||||
--read-burst=<SIZE>
|
||||
</dt>
|
||||
|
||||
<dd><dl>
|
||||
|
||||
<dt><a href="nghttpx.1.html#cmdoption-nghttpx--read-burst">nghttpx command line option</a>
|
||||
</dt>
|
||||
|
||||
</dl></dd>
|
||||
|
||||
<dt>
|
||||
--read-rate=<RATE>
|
||||
</dt>
|
||||
|
||||
<dd><dl>
|
||||
|
||||
<dt><a href="nghttpx.1.html#cmdoption-nghttpx--read-rate">nghttpx command line option</a>
|
||||
</dt>
|
||||
|
||||
</dl></dd>
|
||||
|
||||
<dt>
|
||||
--stream-read-timeout=<SEC>
|
||||
</dt>
|
||||
|
@ -769,6 +804,8 @@
|
|||
</dt>
|
||||
|
||||
</dl></dd>
|
||||
</dl></td>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt>
|
||||
--stream-write-timeout=<SEC>
|
||||
|
@ -780,8 +817,6 @@
|
|||
</dt>
|
||||
|
||||
</dl></dd>
|
||||
</dl></td>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt>
|
||||
--subcert=<KEYPATH>:<CERTPATH>
|
||||
|
@ -923,6 +958,28 @@
|
|||
|
||||
</dl></dd>
|
||||
|
||||
<dt>
|
||||
--write-burst=<SIZE>
|
||||
</dt>
|
||||
|
||||
<dd><dl>
|
||||
|
||||
<dt><a href="nghttpx.1.html#cmdoption-nghttpx--write-burst">nghttpx command line option</a>
|
||||
</dt>
|
||||
|
||||
</dl></dd>
|
||||
|
||||
<dt>
|
||||
--write-rate=<RATE>
|
||||
</dt>
|
||||
|
||||
<dd><dl>
|
||||
|
||||
<dt><a href="nghttpx.1.html#cmdoption-nghttpx--write-rate">nghttpx command line option</a>
|
||||
</dt>
|
||||
|
||||
</dl></dd>
|
||||
|
||||
<dt>
|
||||
-a, --get-assets
|
||||
</dt>
|
||||
|
@ -1792,6 +1849,10 @@
|
|||
</dt>
|
||||
|
||||
|
||||
<dt><a href="apiref.html#c.NGHTTP2_ERR_BAD_PREFACE">NGHTTP2_ERR_BAD_PREFACE (C macro)</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="apiref.html#c.NGHTTP2_ERR_BUFFER_ERROR">NGHTTP2_ERR_BUFFER_ERROR (C macro)</a>
|
||||
</dt>
|
||||
|
||||
|
@ -2072,6 +2133,10 @@
|
|||
</dt>
|
||||
|
||||
|
||||
<dt><a href="apiref.html#c.nghttp2_frame_hd.reserved">nghttp2_frame_hd.reserved (C member)</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="apiref.html#c.nghttp2_frame_hd.stream_id">nghttp2_frame_hd.stream_id (C member)</a>
|
||||
</dt>
|
||||
|
||||
|
@ -2116,6 +2181,10 @@
|
|||
</dt>
|
||||
|
||||
|
||||
<dt><a href="apiref.html#c.nghttp2_goaway.reserved">nghttp2_goaway.reserved (C member)</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="apiref.html#c.NGHTTP2_HCAT_HEADERS">NGHTTP2_HCAT_HEADERS (C macro)</a>
|
||||
</dt>
|
||||
|
||||
|
@ -2390,6 +2459,10 @@
|
|||
</dt>
|
||||
|
||||
|
||||
<dt><a href="apiref.html#c.nghttp2_option_set_recv_client_preface">nghttp2_option_set_recv_client_preface (C function)</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="apiref.html#c.nghttp2_pack_settings_payload">nghttp2_pack_settings_payload (C function)</a>
|
||||
</dt>
|
||||
|
||||
|
@ -2490,6 +2563,10 @@
|
|||
</dt>
|
||||
|
||||
|
||||
<dt><a href="apiref.html#c.nghttp2_push_promise.reserved">nghttp2_push_promise.reserved (C member)</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="apiref.html#c.nghttp2_recv_callback">nghttp2_recv_callback (C type)</a>
|
||||
</dt>
|
||||
|
||||
|
@ -2858,6 +2935,10 @@
|
|||
</dt>
|
||||
|
||||
|
||||
<dt><a href="apiref.html#c.nghttp2_window_update.reserved">nghttp2_window_update.reserved (C member)</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="apiref.html#c.nghttp2_window_update.window_size_increment">nghttp2_window_update.window_size_increment (C member)</a>
|
||||
</dt>
|
||||
|
||||
|
@ -3091,6 +3172,10 @@
|
|||
</dt>
|
||||
|
||||
|
||||
<dt><a href="nghttpx.1.html#cmdoption-nghttpx--listener-disable-timeout">--listener-disable-timeout=<SEC></a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="nghttpx.1.html#cmdoption-nghttpx--no-location-rewrite">--no-location-rewrite</a>
|
||||
</dt>
|
||||
|
||||
|
@ -3115,6 +3200,14 @@
|
|||
</dt>
|
||||
|
||||
|
||||
<dt><a href="nghttpx.1.html#cmdoption-nghttpx--read-burst">--read-burst=<SIZE></a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="nghttpx.1.html#cmdoption-nghttpx--read-rate">--read-rate=<RATE></a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="nghttpx.1.html#cmdoption-nghttpx--stream-read-timeout">--stream-read-timeout=<SEC></a>
|
||||
</dt>
|
||||
|
||||
|
@ -3167,6 +3260,14 @@
|
|||
</dt>
|
||||
|
||||
|
||||
<dt><a href="nghttpx.1.html#cmdoption-nghttpx--write-burst">--write-burst=<SIZE></a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="nghttpx.1.html#cmdoption-nghttpx--write-rate">--write-rate=<RATE></a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="nghttpx.1.html#cmdoption-nghttpx-D">-D, --daemon</a>
|
||||
</dt>
|
||||
|
||||
|
@ -3375,7 +3476,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'0.6.0-DEV',
|
||||
VERSION:'0.6.2-DEV',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
HAS_SOURCE: false
|
||||
|
|
|
@ -7,14 +7,14 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>h2load - HTTP/2 benchmarking tool - HOW-TO — nghttp2 0.6.0-DEV documentation</title>
|
||||
<title>h2load - HTTP/2 benchmarking tool - HOW-TO — nghttp2 0.6.2-DEV documentation</title>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
|
||||
<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'>
|
||||
|
||||
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
|||
|
||||
|
||||
|
||||
<link rel="top" title="nghttp2 0.6.0-DEV documentation" href="index.html"/>
|
||||
<link rel="top" title="nghttp2 0.6.2-DEV 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"/>
|
||||
|
||||
|
@ -44,7 +44,9 @@
|
|||
|
||||
<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>
|
||||
|
||||
<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" />
|
||||
|
@ -188,7 +190,7 @@
|
|||
</ul>
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main">
|
||||
<div role="main" class="document">
|
||||
|
||||
<div class="section" id="h2load-http-2-benchmarking-tool-how-to">
|
||||
<h1>h2load - HTTP/2 benchmarking tool - HOW-TO<a class="headerlink" href="#h2load-http-2-benchmarking-tool-how-to" title="Permalink to this headline">¶</a></h1>
|
||||
|
@ -312,7 +314,7 @@ and ignores those parts in the rest of the URIs.</p>
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'0.6.0-DEV',
|
||||
VERSION:'0.6.2-DEV',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
HAS_SOURCE: false
|
||||
|
|
|
@ -7,14 +7,14 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>h2load(1) — nghttp2 0.6.0-DEV documentation</title>
|
||||
<title>h2load(1) — nghttp2 0.6.2-DEV documentation</title>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
|
||||
<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'>
|
||||
|
||||
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
|||
|
||||
|
||||
|
||||
<link rel="top" title="nghttp2 0.6.0-DEV documentation" href="index.html"/>
|
||||
<link rel="top" title="nghttp2 0.6.2-DEV 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"/>
|
||||
|
||||
|
@ -44,7 +44,9 @@
|
|||
|
||||
<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>
|
||||
|
||||
<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" />
|
||||
|
@ -188,7 +190,7 @@
|
|||
</ul>
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main">
|
||||
<div role="main" class="document">
|
||||
|
||||
<div class="section" id="h2load-1">
|
||||
<h1>h2load(1)<a class="headerlink" href="#h2load-1" title="Permalink to this headline">¶</a></h1>
|
||||
|
@ -333,7 +335,7 @@ Default: h2c-14</p>
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'0.6.0-DEV',
|
||||
VERSION:'0.6.2-DEV',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
HAS_SOURCE: false
|
||||
|
|
14
index.html
14
index.html
|
@ -7,14 +7,14 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>nghttp2 - HTTP/2 C Library — nghttp2 0.6.0-DEV documentation</title>
|
||||
<title>nghttp2 - HTTP/2 C Library — nghttp2 0.6.2-DEV documentation</title>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
|
||||
<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'>
|
||||
|
||||
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
|||
|
||||
|
||||
|
||||
<link rel="top" title="nghttp2 0.6.0-DEV documentation" href="#"/>
|
||||
<link rel="top" title="nghttp2 0.6.2-DEV documentation" href="#"/>
|
||||
<link rel="next" title="nghttp2 - HTTP/2 C Library" href="package_README.html"/>
|
||||
|
||||
|
||||
|
@ -43,7 +43,9 @@
|
|||
|
||||
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
||||
<div class="wy-side-nav-search">
|
||||
<a href="#" class="fa fa-home"> nghttp2</a>
|
||||
|
||||
<a href="#" 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" />
|
||||
|
@ -187,7 +189,7 @@
|
|||
</ul>
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main">
|
||||
<div role="main" class="document">
|
||||
|
||||
<div class="section" id="nghttp2-http-2-c-library">
|
||||
<h1>nghttp2 - HTTP/2 C Library<a class="headerlink" href="#nghttp2-http-2-c-library" title="Permalink to this headline">¶</a></h1>
|
||||
|
@ -355,7 +357,7 @@ version 2.</p>
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'0.6.0-DEV',
|
||||
VERSION:'0.6.2-DEV',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
HAS_SOURCE: false
|
||||
|
|
|
@ -7,14 +7,14 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>nghttp(1) — nghttp2 0.6.0-DEV documentation</title>
|
||||
<title>nghttp(1) — nghttp2 0.6.2-DEV documentation</title>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
|
||||
<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'>
|
||||
|
||||
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
|||
|
||||
|
||||
|
||||
<link rel="top" title="nghttp2 0.6.0-DEV documentation" href="index.html"/>
|
||||
<link rel="top" title="nghttp2 0.6.2-DEV 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"/>
|
||||
|
||||
|
@ -44,7 +44,9 @@
|
|||
|
||||
<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>
|
||||
|
||||
<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" />
|
||||
|
@ -188,7 +190,7 @@
|
|||
</ul>
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main">
|
||||
<div role="main" class="document">
|
||||
|
||||
<div class="section" id="nghttp-1">
|
||||
<h1>nghttp(1)<a class="headerlink" href="#nghttp-1" title="Permalink to this headline">¶</a></h1>
|
||||
|
@ -419,7 +421,7 @@ padding. Specify 0 to disable padding.</p>
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'0.6.0-DEV',
|
||||
VERSION:'0.6.2-DEV',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
HAS_SOURCE: false
|
||||
|
|
|
@ -7,14 +7,14 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>nghttp2.h — nghttp2 0.6.0-DEV documentation</title>
|
||||
<title>nghttp2.h — nghttp2 0.6.2-DEV documentation</title>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
|
||||
<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'>
|
||||
|
||||
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
|||
|
||||
|
||||
|
||||
<link rel="top" title="nghttp2 0.6.0-DEV documentation" href="index.html"/>
|
||||
<link rel="top" title="nghttp2 0.6.2-DEV 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"/>
|
||||
|
||||
|
@ -44,7 +44,9 @@
|
|||
|
||||
<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>
|
||||
|
||||
<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" />
|
||||
|
@ -188,7 +190,7 @@
|
|||
</ul>
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main">
|
||||
<div role="main" class="document">
|
||||
|
||||
<div class="section" id="nghttp2-h">
|
||||
<h1>nghttp2.h<a class="headerlink" href="#nghttp2-h" title="Permalink to this headline">¶</a></h1>
|
||||
|
@ -535,7 +537,12 @@
|
|||
<span class="cm">/**</span>
|
||||
<span class="cm"> * The user callback function failed. This is a fatal error.</span>
|
||||
<span class="cm"> */</span>
|
||||
<span class="n">NGHTTP2_ERR_CALLBACK_FAILURE</span> <span class="o">=</span> <span class="o">-</span><span class="mi">902</span>
|
||||
<span class="n">NGHTTP2_ERR_CALLBACK_FAILURE</span> <span class="o">=</span> <span class="o">-</span><span class="mi">902</span><span class="p">,</span>
|
||||
<span class="cm">/**</span>
|
||||
<span class="cm"> * Invalid connection preface was received and further processing is</span>
|
||||
<span class="cm"> * not possible.</span>
|
||||
<span class="cm"> */</span>
|
||||
<span class="n">NGHTTP2_ERR_BAD_PREFACE</span> <span class="o">=</span> <span class="o">-</span><span class="mi">903</span>
|
||||
<span class="p">}</span> <span class="n">nghttp2_error</span><span class="p">;</span>
|
||||
|
||||
<span class="cm">/**</span>
|
||||
|
@ -799,6 +806,11 @@
|
|||
<span class="cm"> * The flags.</span>
|
||||
<span class="cm"> */</span>
|
||||
<span class="kt">uint8_t</span> <span class="n">flags</span><span class="p">;</span>
|
||||
<span class="cm">/**</span>
|
||||
<span class="cm"> * Reserved bit in frame header. Currently, this is always set to 0</span>
|
||||
<span class="cm"> * and application should not expect something useful in here.</span>
|
||||
<span class="cm"> */</span>
|
||||
<span class="kt">uint8_t</span> <span class="n">reserved</span><span class="p">;</span>
|
||||
<span class="p">}</span> <span class="n">nghttp2_frame_hd</span><span class="p">;</span>
|
||||
|
||||
|
||||
|
@ -1081,6 +1093,11 @@
|
|||
<span class="cm"> * The promised stream ID</span>
|
||||
<span class="cm"> */</span>
|
||||
<span class="kt">int32_t</span> <span class="n">promised_stream_id</span><span class="p">;</span>
|
||||
<span class="cm">/**</span>
|
||||
<span class="cm"> * Reserved bit. Currently this is always set to 0 and application</span>
|
||||
<span class="cm"> * should not expect something useful in here.</span>
|
||||
<span class="cm"> */</span>
|
||||
<span class="kt">uint8_t</span> <span class="n">reserved</span><span class="p">;</span>
|
||||
<span class="p">}</span> <span class="n">nghttp2_push_promise</span><span class="p">;</span>
|
||||
|
||||
<span class="cm">/**</span>
|
||||
|
@ -1125,6 +1142,11 @@
|
|||
<span class="cm"> * The length of |opaque_data| member.</span>
|
||||
<span class="cm"> */</span>
|
||||
<span class="kt">size_t</span> <span class="n">opaque_data_len</span><span class="p">;</span>
|
||||
<span class="cm">/**</span>
|
||||
<span class="cm"> * Reserved bit. Currently this is always set to 0 and application</span>
|
||||
<span class="cm"> * should not expect something useful in here.</span>
|
||||
<span class="cm"> */</span>
|
||||
<span class="kt">uint8_t</span> <span class="n">reserved</span><span class="p">;</span>
|
||||
<span class="p">}</span> <span class="n">nghttp2_goaway</span><span class="p">;</span>
|
||||
|
||||
<span class="cm">/**</span>
|
||||
|
@ -1141,6 +1163,11 @@
|
|||
<span class="cm"> * The window size increment.</span>
|
||||
<span class="cm"> */</span>
|
||||
<span class="kt">int32_t</span> <span class="n">window_size_increment</span><span class="p">;</span>
|
||||
<span class="cm">/**</span>
|
||||
<span class="cm"> * Reserved bit. Currently this is always set to 0 and application</span>
|
||||
<span class="cm"> * should not expect something useful in here.</span>
|
||||
<span class="cm"> */</span>
|
||||
<span class="kt">uint8_t</span> <span class="n">reserved</span><span class="p">;</span>
|
||||
<span class="p">}</span> <span class="n">nghttp2_window_update</span><span class="p">;</span>
|
||||
|
||||
<span class="cm">/**</span>
|
||||
|
@ -1910,6 +1937,24 @@
|
|||
<span class="kt">void</span> <span class="nf">nghttp2_option_set_peer_max_concurrent_streams</span><span class="p">(</span><span class="n">nghttp2_option</span> <span class="o">*</span><span class="n">option</span><span class="p">,</span>
|
||||
<span class="kt">uint32_t</span> <span class="n">val</span><span class="p">);</span>
|
||||
|
||||
<span class="cm">/**</span>
|
||||
<span class="cm"> * @function</span>
|
||||
<span class="cm"> *</span>
|
||||
<span class="cm"> * By default, nghttp2 library only handles HTTP/2 frames and does not</span>
|
||||
<span class="cm"> * recognize first 24 bytes of client connection preface. This design</span>
|
||||
<span class="cm"> * choice is done due to the fact that server may want to detect the</span>
|
||||
<span class="cm"> * application protocol based on first few bytes on clear text</span>
|
||||
<span class="cm"> * communication. But for simple servers which only speak HTTP/2, it</span>
|
||||
<span class="cm"> * is easier for developers if nghttp2 library takes care of client</span>
|
||||
<span class="cm"> * connection preface.</span>
|
||||
<span class="cm"> *</span>
|
||||
<span class="cm"> * If this option is used with nonzero |val|, nghttp2 library checks</span>
|
||||
<span class="cm"> * first 24 bytes client connection preface. If it is not a valid</span>
|
||||
<span class="cm"> * one, `nghttp2_session_recv()` and `nghttp2_session_mem_recv()` will</span>
|
||||
<span class="cm"> * return error :enum:`NGHTTP2_ERR_BAD_PREFACE`, which is fatal error.</span>
|
||||
<span class="cm"> */</span>
|
||||
<span class="kt">void</span> <span class="nf">nghttp2_option_set_recv_client_preface</span><span class="p">(</span><span class="n">nghttp2_option</span> <span class="o">*</span><span class="n">option</span><span class="p">,</span> <span class="kt">int</span> <span class="n">val</span><span class="p">);</span>
|
||||
|
||||
<span class="cm">/**</span>
|
||||
<span class="cm"> * @function</span>
|
||||
<span class="cm"> *</span>
|
||||
|
@ -2160,6 +2205,10 @@
|
|||
<span class="cm"> * Out of memory.</span>
|
||||
<span class="cm"> * :enum:`NGHTTP2_ERR_CALLBACK_FAILURE`</span>
|
||||
<span class="cm"> * The callback function failed.</span>
|
||||
<span class="cm"> * :enum:`NGHTTP2_ERR_BAD_PREFACE`</span>
|
||||
<span class="cm"> * Invalid client preface was detected. This error only returns</span>
|
||||
<span class="cm"> * when |session| was configured as server and</span>
|
||||
<span class="cm"> * `nghttp2_option_set_recv_client_preface()` is used.</span>
|
||||
<span class="cm"> */</span>
|
||||
<span class="kt">int</span> <span class="nf">nghttp2_session_recv</span><span class="p">(</span><span class="n">nghttp2_session</span> <span class="o">*</span><span class="n">session</span><span class="p">);</span>
|
||||
|
||||
|
@ -2191,6 +2240,10 @@
|
|||
<span class="cm"> * Out of memory.</span>
|
||||
<span class="cm"> * :enum:`NGHTTP2_ERR_CALLBACK_FAILURE`</span>
|
||||
<span class="cm"> * The callback function failed.</span>
|
||||
<span class="cm"> * :enum:`NGHTTP2_ERR_BAD_PREFACE`</span>
|
||||
<span class="cm"> * Invalid client preface was detected. This error only returns</span>
|
||||
<span class="cm"> * when |session| was configured as server and</span>
|
||||
<span class="cm"> * `nghttp2_option_set_recv_client_preface()` is used.</span>
|
||||
<span class="cm"> */</span>
|
||||
<span class="kt">ssize_t</span> <span class="nf">nghttp2_session_mem_recv</span><span class="p">(</span><span class="n">nghttp2_session</span> <span class="o">*</span><span class="n">session</span><span class="p">,</span>
|
||||
<span class="k">const</span> <span class="kt">uint8_t</span> <span class="o">*</span><span class="n">in</span><span class="p">,</span> <span class="kt">size_t</span> <span class="n">inlen</span><span class="p">);</span>
|
||||
|
@ -3490,7 +3543,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'0.6.0-DEV',
|
||||
VERSION:'0.6.2-DEV',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
HAS_SOURCE: false
|
||||
|
|
|
@ -7,14 +7,14 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>nghttp2ver.h — nghttp2 0.6.0-DEV documentation</title>
|
||||
<title>nghttp2ver.h — nghttp2 0.6.2-DEV documentation</title>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
|
||||
<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'>
|
||||
|
||||
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
|||
|
||||
|
||||
|
||||
<link rel="top" title="nghttp2 0.6.0-DEV documentation" href="index.html"/>
|
||||
<link rel="top" title="nghttp2 0.6.2-DEV documentation" href="index.html"/>
|
||||
<link rel="prev" title="nghttp2.h" href="nghttp2.h.html"/>
|
||||
|
||||
|
||||
|
@ -43,7 +43,9 @@
|
|||
|
||||
<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>
|
||||
|
||||
<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" />
|
||||
|
@ -187,7 +189,7 @@
|
|||
</ul>
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main">
|
||||
<div role="main" class="document">
|
||||
|
||||
<div class="section" id="nghttp2ver-h">
|
||||
<h1>nghttp2ver.h<a class="headerlink" href="#nghttp2ver-h" title="Permalink to this headline">¶</a></h1>
|
||||
|
@ -222,7 +224,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 "0.6.0-DEV"</span>
|
||||
<span class="cp">#define NGHTTP2_VERSION "0.6.2-DEV"</span>
|
||||
|
||||
<span class="cm">/**</span>
|
||||
<span class="cm"> * @macro</span>
|
||||
|
@ -230,7 +232,7 @@
|
|||
<span class="cm"> * release. This is a 24 bit number with 8 bits for major number, 8 bits</span>
|
||||
<span class="cm"> * for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203.</span>
|
||||
<span class="cm"> */</span>
|
||||
<span class="cp">#define NGHTTP2_VERSION_NUM 0x000600</span>
|
||||
<span class="cp">#define NGHTTP2_VERSION_NUM 0x000602</span>
|
||||
|
||||
<span class="cp">#endif </span><span class="cm">/* NGHTTP2VER_H */</span><span class="cp"></span>
|
||||
</pre></div>
|
||||
|
@ -273,7 +275,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'0.6.0-DEV',
|
||||
VERSION:'0.6.2-DEV',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
HAS_SOURCE: false
|
||||
|
|
|
@ -7,14 +7,14 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>nghttpd(1) — nghttp2 0.6.0-DEV documentation</title>
|
||||
<title>nghttpd(1) — nghttp2 0.6.2-DEV documentation</title>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
|
||||
<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'>
|
||||
|
||||
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
|||
|
||||
|
||||
|
||||
<link rel="top" title="nghttp2 0.6.0-DEV documentation" href="index.html"/>
|
||||
<link rel="top" title="nghttp2 0.6.2-DEV documentation" href="index.html"/>
|
||||
<link rel="next" title="nghttpx(1)" href="nghttpx.1.html"/>
|
||||
<link rel="prev" title="nghttp(1)" href="nghttp.1.html"/>
|
||||
|
||||
|
@ -44,7 +44,9 @@
|
|||
|
||||
<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>
|
||||
|
||||
<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" />
|
||||
|
@ -188,7 +190,7 @@
|
|||
</ul>
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main">
|
||||
<div role="main" class="document">
|
||||
|
||||
<div class="section" id="nghttpd-1">
|
||||
<h1>nghttpd(1)<a class="headerlink" href="#nghttpd-1" title="Permalink to this headline">¶</a></h1>
|
||||
|
@ -383,7 +385,7 @@ received.</p>
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'0.6.0-DEV',
|
||||
VERSION:'0.6.2-DEV',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
HAS_SOURCE: false
|
||||
|
|
|
@ -7,14 +7,14 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>nghttpx - HTTP/2 proxy - HOW-TO — nghttp2 0.6.0-DEV documentation</title>
|
||||
<title>nghttpx - HTTP/2 proxy - HOW-TO — nghttp2 0.6.2-DEV documentation</title>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
|
||||
<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'>
|
||||
|
||||
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
|||
|
||||
|
||||
|
||||
<link rel="top" title="nghttp2 0.6.0-DEV documentation" href="index.html"/>
|
||||
<link rel="top" title="nghttp2 0.6.2-DEV 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"/>
|
||||
|
||||
|
@ -44,7 +44,9 @@
|
|||
|
||||
<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>
|
||||
|
||||
<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" />
|
||||
|
@ -188,7 +190,7 @@
|
|||
</ul>
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main">
|
||||
<div role="main" class="document">
|
||||
|
||||
<div class="section" id="nghttpx-http-2-proxy-how-to">
|
||||
<h1>nghttpx - HTTP/2 proxy - HOW-TO<a class="headerlink" href="#nghttpx-http-2-proxy-how-to" title="Permalink to this headline">¶</a></h1>
|
||||
|
@ -480,7 +482,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.0-DEV',
|
||||
VERSION:'0.6.2-DEV',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
HAS_SOURCE: false
|
||||
|
|
|
@ -7,14 +7,14 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>nghttpx(1) — nghttp2 0.6.0-DEV documentation</title>
|
||||
<title>nghttpx(1) — nghttp2 0.6.2-DEV documentation</title>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
|
||||
<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'>
|
||||
|
||||
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
|||
|
||||
|
||||
|
||||
<link rel="top" title="nghttp2 0.6.0-DEV documentation" href="index.html"/>
|
||||
<link rel="top" title="nghttp2 0.6.2-DEV documentation" href="index.html"/>
|
||||
<link rel="next" title="h2load(1)" href="h2load.1.html"/>
|
||||
<link rel="prev" title="nghttpd(1)" href="nghttpd.1.html"/>
|
||||
|
||||
|
@ -44,7 +44,9 @@
|
|||
|
||||
<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>
|
||||
|
||||
<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" />
|
||||
|
@ -188,7 +190,7 @@
|
|||
</ul>
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main">
|
||||
<div role="main" class="document">
|
||||
|
||||
<div class="section" id="nghttpx-1">
|
||||
<h1>nghttpx(1)<a class="headerlink" href="#nghttpx-1" title="Permalink to this headline">¶</a></h1>
|
||||
|
@ -261,6 +263,25 @@ Default: -1</p>
|
|||
<dd><p>Resolve backend hostname to IPv6 address only.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="option">
|
||||
<dt id="cmdoption-nghttpx--backend-http-proxy-uri">
|
||||
<tt class="descname">--backend-http-proxy-uri</tt><tt class="descclassname">=<URI></tt><a class="headerlink" href="#cmdoption-nghttpx--backend-http-proxy-uri" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Specify proxy URI in the form
|
||||
<a class="reference external" href="http:/">http:/</a>/[<USER>:<PASS>@]<PROXY>:<PORT>. If a
|
||||
proxy requires authentication, specify <USER> and
|
||||
<PASS>. Note that they must be properly
|
||||
percent-encoded. This proxy is used when the
|
||||
backend connection is HTTP/2. First, make a
|
||||
CONNECT request to the proxy and it connects to
|
||||
the backend on behalf of nghttpx. This forms
|
||||
tunnel. After that, nghttpx performs SSL/TLS
|
||||
handshake with the downstream through the tunnel.
|
||||
The timeouts when connecting and making CONNECT
|
||||
request can be specified by
|
||||
<a class="reference internal" href="#cmdoption-nghttpx--backend-read-timeout"><em class="xref std std-option">--backend-read-timeout</em></a> and
|
||||
<a class="reference internal" href="#cmdoption-nghttpx--backend-write-timeout"><em class="xref std std-option">--backend-write-timeout</em></a> options.</p>
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
<div class="section" id="performance">
|
||||
<h3>Performance<a class="headerlink" href="#performance" title="Permalink to this headline">¶</a></h3>
|
||||
|
@ -271,6 +292,44 @@ Default: -1</p>
|
|||
Default: 1</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="option">
|
||||
<dt id="cmdoption-nghttpx--read-rate">
|
||||
<tt class="descname">--read-rate</tt><tt class="descclassname">=<RATE></tt><a class="headerlink" href="#cmdoption-nghttpx--read-rate" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Set maximum average read rate on frontend
|
||||
connection. Setting 0 to this option means read
|
||||
rate is unlimited.
|
||||
Default: 0</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="option">
|
||||
<dt id="cmdoption-nghttpx--read-burst">
|
||||
<tt class="descname">--read-burst</tt><tt class="descclassname">=<SIZE></tt><a class="headerlink" href="#cmdoption-nghttpx--read-burst" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Set maximum read burst size on frontend
|
||||
connection. Setting 0 does not work, but it is
|
||||
not a problem because –read-rate=0 will give
|
||||
unlimited read rate regardless of this option
|
||||
value.
|
||||
Default: 1073741824</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="option">
|
||||
<dt id="cmdoption-nghttpx--write-rate">
|
||||
<tt class="descname">--write-rate</tt><tt class="descclassname">=<RATE></tt><a class="headerlink" href="#cmdoption-nghttpx--write-rate" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Set maximum average write rate on frontend
|
||||
connection. Setting 0 to this option means write
|
||||
rate is unlimited.
|
||||
Default: 0</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="option">
|
||||
<dt id="cmdoption-nghttpx--write-burst">
|
||||
<tt class="descname">--write-burst</tt><tt class="descclassname">=<SIZE></tt><a class="headerlink" href="#cmdoption-nghttpx--write-burst" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Set maximum write burst size on frontend
|
||||
connection. Setting 0 to this option means write
|
||||
burst size is unlimited.
|
||||
Default: 0</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="option">
|
||||
<dt id="cmdoption-nghttpx--worker-read-rate">
|
||||
<tt class="descname">--worker-read-rate</tt><tt class="descclassname">=<RATE></tt><a class="headerlink" href="#cmdoption-nghttpx--worker-read-rate" title="Permalink to this definition">¶</a></dt>
|
||||
|
@ -391,22 +450,12 @@ Default: 60</p>
|
|||
</dd></dl>
|
||||
|
||||
<dl class="option">
|
||||
<dt id="cmdoption-nghttpx--backend-http-proxy-uri">
|
||||
<tt class="descname">--backend-http-proxy-uri</tt><tt class="descclassname">=<URI></tt><a class="headerlink" href="#cmdoption-nghttpx--backend-http-proxy-uri" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Specify proxy URI in the form
|
||||
<a class="reference external" href="http:/">http:/</a>/[<USER>:<PASS>@]<PROXY>:<PORT>. If a
|
||||
proxy requires authentication, specify <USER> and
|
||||
<PASS>. Note that they must be properly
|
||||
percent-encoded. This proxy is used when the
|
||||
backend connection is HTTP/2. First, make a
|
||||
CONNECT request to the proxy and it connects to
|
||||
the backend on behalf of nghttpx. This forms
|
||||
tunnel. After that, nghttpx performs SSL/TLS
|
||||
handshake with the downstream through the tunnel.
|
||||
The timeouts when connecting and making CONNECT
|
||||
request can be specified by
|
||||
<a class="reference internal" href="#cmdoption-nghttpx--backend-read-timeout"><em class="xref std std-option">--backend-read-timeout</em></a> and
|
||||
<a class="reference internal" href="#cmdoption-nghttpx--backend-write-timeout"><em class="xref std std-option">--backend-write-timeout</em></a> options.</p>
|
||||
<dt id="cmdoption-nghttpx--listener-disable-timeout">
|
||||
<tt class="descname">--listener-disable-timeout</tt><tt class="descclassname">=<SEC></tt><a class="headerlink" href="#cmdoption-nghttpx--listener-disable-timeout" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>After accepting connection failed, connection
|
||||
listener is disabled for a given time in seconds.
|
||||
Specifying 0 disables this feature.
|
||||
Default: 0</p>
|
||||
</dd></dl>
|
||||
|
||||
</div>
|
||||
|
@ -861,7 +910,7 @@ Default: /etc/nghttpx/nghttpx.conf</p>
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'0.6.0-DEV',
|
||||
VERSION:'0.6.2-DEV',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
HAS_SOURCE: false
|
||||
|
|
BIN
objects.inv
BIN
objects.inv
Binary file not shown.
|
@ -7,14 +7,14 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>nghttp2 - HTTP/2 C Library — nghttp2 0.6.0-DEV documentation</title>
|
||||
<title>nghttp2 - HTTP/2 C Library — nghttp2 0.6.2-DEV documentation</title>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
|
||||
<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'>
|
||||
|
||||
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
|||
|
||||
|
||||
|
||||
<link rel="top" title="nghttp2 0.6.0-DEV documentation" href="index.html"/>
|
||||
<link rel="top" title="nghttp2 0.6.2-DEV 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"/>
|
||||
|
||||
|
@ -44,7 +44,9 @@
|
|||
|
||||
<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>
|
||||
|
||||
<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" />
|
||||
|
@ -188,7 +190,7 @@
|
|||
</ul>
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main">
|
||||
<div role="main" class="document">
|
||||
|
||||
<div class="section" id="nghttp2-http-2-c-library">
|
||||
<h1>nghttp2 - HTTP/2 C Library<a class="headerlink" href="#nghttp2-http-2-c-library" title="Permalink to this headline">¶</a></h1>
|
||||
|
@ -1286,7 +1288,7 @@ full real name when contributing!</p>
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'0.6.0-DEV',
|
||||
VERSION:'0.6.2-DEV',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
HAS_SOURCE: false
|
||||
|
|
|
@ -7,14 +7,14 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Python Module Index — nghttp2 0.6.0-DEV documentation</title>
|
||||
<title>Python Module Index — nghttp2 0.6.2-DEV documentation</title>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
|
||||
<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'>
|
||||
|
||||
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
|||
|
||||
|
||||
|
||||
<link rel="top" title="nghttp2 0.6.0-DEV documentation" href="index.html"/>
|
||||
<link rel="top" title="nghttp2 0.6.2-DEV documentation" href="index.html"/>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
@ -49,7 +49,9 @@
|
|||
|
||||
<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>
|
||||
|
||||
<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" />
|
||||
|
@ -193,7 +195,7 @@
|
|||
</ul>
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main">
|
||||
<div role="main" class="document">
|
||||
|
||||
|
||||
<h1>Python Module Index</h1>
|
||||
|
@ -242,7 +244,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'0.6.0-DEV',
|
||||
VERSION:'0.6.2-DEV',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
HAS_SOURCE: false
|
||||
|
|
|
@ -7,14 +7,14 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Python API Reference — nghttp2 0.6.0-DEV documentation</title>
|
||||
<title>Python API Reference — nghttp2 0.6.2-DEV documentation</title>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
|
||||
<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'>
|
||||
|
||||
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
|||
|
||||
|
||||
|
||||
<link rel="top" title="nghttp2 0.6.0-DEV documentation" href="index.html"/>
|
||||
<link rel="top" title="nghttp2 0.6.2-DEV documentation" href="index.html"/>
|
||||
<link rel="next" title="nghttp2.h" href="nghttp2.h.html"/>
|
||||
<link rel="prev" title="API Reference" href="apiref.html"/>
|
||||
|
||||
|
@ -44,7 +44,9 @@
|
|||
|
||||
<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>
|
||||
|
||||
<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" />
|
||||
|
@ -188,7 +190,7 @@
|
|||
</ul>
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main">
|
||||
<div role="main" class="document">
|
||||
|
||||
<div class="section" id="module-nghttp2">
|
||||
<span id="python-api-reference"></span><h1>Python API Reference<a class="headerlink" href="#module-nghttp2" title="Permalink to this headline">¶</a></h1>
|
||||
|
@ -569,7 +571,7 @@ encoded using UTF-8.</p>
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'0.6.0-DEV',
|
||||
VERSION:'0.6.2-DEV',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
HAS_SOURCE: false
|
||||
|
|
14
search.html
14
search.html
|
@ -7,14 +7,14 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Search — nghttp2 0.6.0-DEV documentation</title>
|
||||
<title>Search — nghttp2 0.6.2-DEV documentation</title>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
|
||||
<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'>
|
||||
|
||||
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
|||
|
||||
|
||||
|
||||
<link rel="top" title="nghttp2 0.6.0-DEV documentation" href="index.html"/>
|
||||
<link rel="top" title="nghttp2 0.6.2-DEV documentation" href="index.html"/>
|
||||
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
|
||||
|
@ -42,7 +42,9 @@
|
|||
|
||||
<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>
|
||||
|
||||
<a href="index.html" class="fa fa-home"> nghttp2</a>
|
||||
|
||||
<div role="search">
|
||||
<form id ="rtd-search-form" class="wy-form" action="#" method="get">
|
||||
<input type="text" name="q" placeholder="Search docs" />
|
||||
|
@ -186,7 +188,7 @@
|
|||
</ul>
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main">
|
||||
<div role="main" class="document">
|
||||
|
||||
<noscript>
|
||||
<div id="fallback" class="admonition warning">
|
||||
|
@ -230,7 +232,7 @@
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'0.6.0-DEV',
|
||||
VERSION:'0.6.2-DEV',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
HAS_SOURCE: false
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -7,14 +7,14 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Tutorial: HTTP/2 client — nghttp2 0.6.0-DEV documentation</title>
|
||||
<title>Tutorial: HTTP/2 client — nghttp2 0.6.2-DEV documentation</title>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
|
||||
<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'>
|
||||
|
||||
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
|||
|
||||
|
||||
|
||||
<link rel="top" title="nghttp2 0.6.0-DEV documentation" href="index.html"/>
|
||||
<link rel="top" title="nghttp2 0.6.2-DEV 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"/>
|
||||
|
||||
|
@ -44,7 +44,9 @@
|
|||
|
||||
<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>
|
||||
|
||||
<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" />
|
||||
|
@ -188,7 +190,7 @@
|
|||
</ul>
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main">
|
||||
<div role="main" class="document">
|
||||
|
||||
<div class="section" id="tutorial-http-2-client">
|
||||
<h1>Tutorial: HTTP/2 client<a class="headerlink" href="#tutorial-http-2-client" title="Permalink to this headline">¶</a></h1>
|
||||
|
@ -1267,7 +1269,7 @@ here.</p>
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'0.6.0-DEV',
|
||||
VERSION:'0.6.2-DEV',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
HAS_SOURCE: false
|
||||
|
|
|
@ -7,14 +7,14 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Tutorial: HPACK API — nghttp2 0.6.0-DEV documentation</title>
|
||||
<title>Tutorial: HPACK API — nghttp2 0.6.2-DEV documentation</title>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
|
||||
<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'>
|
||||
|
||||
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
|||
|
||||
|
||||
|
||||
<link rel="top" title="nghttp2 0.6.0-DEV documentation" href="index.html"/>
|
||||
<link rel="top" title="nghttp2 0.6.2-DEV 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"/>
|
||||
|
||||
|
@ -44,7 +44,9 @@
|
|||
|
||||
<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>
|
||||
|
||||
<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" />
|
||||
|
@ -188,7 +190,7 @@
|
|||
</ul>
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main">
|
||||
<div role="main" class="document">
|
||||
|
||||
<div class="section" id="tutorial-hpack-api">
|
||||
<h1>Tutorial: HPACK API<a class="headerlink" href="#tutorial-hpack-api" title="Permalink to this headline">¶</a></h1>
|
||||
|
@ -560,7 +562,7 @@ function.</p>
|
|||
<script type="text/javascript">
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT:'./',
|
||||
VERSION:'0.6.0-DEV',
|
||||
VERSION:'0.6.2-DEV',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
HAS_SOURCE: false
|
||||
|
|
|
@ -7,14 +7,14 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Tutorial: HTTP/2 server — nghttp2 0.6.0-DEV documentation</title>
|
||||
<title>Tutorial: HTTP/2 server — nghttp2 0.6.2-DEV documentation</title>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
|
||||
<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'>
|
||||
|
||||
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
|||
|
||||
|
||||
|
||||
<link rel="top" title="nghttp2 0.6.0-DEV documentation" href="index.html"/>
|
||||
<link rel="top" title="nghttp2 0.6.2-DEV 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"/>
|
||||
|
||||
|
@ -44,7 +44,9 @@
|
|||
|
||||
<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>
|
||||
|
||||
<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" />
|
||||
|
@ -188,7 +190,7 @@
|
|||
</ul>
|
||||
<hr/>
|
||||
</div>
|
||||
<div role="main">
|
||||
<div role="main" class="document">
|
||||
|
||||
<div class="section" id="tutorial-http-2-server">
|
||||
<h1>Tutorial: HTTP/2 server<a class="headerlink" href="#tutorial-http-2-server" title="Permalink to this headline">¶</a></h1>
|
||||
|
@ -266,7 +268,6 @@ set to the <tt class="docutils literal"><span class="pre">SSL_CTX</span></tt> ob
|
|||
<span class="n">app_context</span> <span class="o">*</span><span class="n">app_ctx</span><span class="p">;</span>
|
||||
<span class="n">nghttp2_session</span> <span class="o">*</span><span class="n">session</span><span class="p">;</span>
|
||||
<span class="kt">char</span> <span class="o">*</span><span class="n">client_addr</span><span class="p">;</span>
|
||||
<span class="kt">size_t</span> <span class="n">handshake_leftlen</span><span class="p">;</span>
|
||||
<span class="p">}</span> <span class="n">http2_session_data</span><span class="p">;</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
|
@ -279,17 +280,15 @@ set to the <tt class="docutils literal"><span class="pre">SSL_CTX</span></tt> ob
|
|||
<span class="p">}</span> <span class="n">http2_stream_data</span><span class="p">;</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>A single HTTP/2 session can have multiple streams. We manage these multiple
|
||||
streams with a doubly linked list. The first element of this list is pointed
|
||||
to by the <tt class="docutils literal"><span class="pre">root->next</span></tt> in <tt class="docutils literal"><span class="pre">http2_session_data</span></tt>. Initially, <tt class="docutils literal"><span class="pre">root->next</span></tt>
|
||||
is <tt class="docutils literal"><span class="pre">NULL</span></tt>. The <tt class="docutils literal"><span class="pre">handshake_leftlen</span></tt> member of <tt class="docutils literal"><span class="pre">http2_session_data</span></tt> is
|
||||
used to track the number of bytes remaining when receiving the first client
|
||||
connection preface (<a class="reference internal" href="apiref.html#c.NGHTTP2_CLIENT_CONNECTION_PREFACE" title="NGHTTP2_CLIENT_CONNECTION_PREFACE"><tt class="xref c c-macro docutils literal"><span class="pre">NGHTTP2_CLIENT_CONNECTION_PREFACE</span></tt></a>), which is a 24
|
||||
bytes long magic string from the client. We use libevent’s bufferevent
|
||||
structure to perform network I/O. Note that the bufferevent object is kept in
|
||||
<tt class="docutils literal"><span class="pre">http2_session_data</span></tt> and not in <tt class="docutils literal"><span class="pre">http2_stream_data</span></tt>. This is because
|
||||
<tt class="docutils literal"><span class="pre">http2_stream_data</span></tt> is just a logical stream multiplexed over the single
|
||||
connection managed by bufferevent in <tt class="docutils literal"><span class="pre">http2_session_data</span></tt>.</p>
|
||||
<p>A single HTTP/2 session can have multiple streams. We manage these
|
||||
multiple streams with a doubly linked list. The first element of this
|
||||
list is pointed to by the <tt class="docutils literal"><span class="pre">root->next</span></tt> in <tt class="docutils literal"><span class="pre">http2_session_data</span></tt>.
|
||||
Initially, <tt class="docutils literal"><span class="pre">root->next</span></tt> is <tt class="docutils literal"><span class="pre">NULL</span></tt>. We use libevent’s bufferevent
|
||||
structure to perform network I/O. Note that the bufferevent object is
|
||||
kept in <tt class="docutils literal"><span class="pre">http2_session_data</span></tt> and not in <tt class="docutils literal"><span class="pre">http2_stream_data</span></tt>. This
|
||||
is because <tt class="docutils literal"><span class="pre">http2_stream_data</span></tt> is just a logical stream multiplexed
|
||||
over the single connection managed by bufferevent in
|
||||
<tt class="docutils literal"><span class="pre">http2_session_data</span></tt>.</p>
|
||||
<p>We first create a listener object to accept incoming connections. We use
|
||||
libevent’s <tt class="docutils literal"><span class="pre">struct</span> <span class="pre">evconnlistener</span></tt> for this purpose:</p>
|
||||
<div class="highlight-c"><div class="highlight"><pre><span class="k">static</span> <span class="kt">void</span> <span class="nf">start_listen</span><span class="p">(</span><span class="k">struct</span> <span class="n">event_base</span> <span class="o">*</span><span class="n">evbase</span><span class="p">,</span> <span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">service</span><span class="p">,</span>
|
||||
|
@ -334,14 +333,15 @@ accepted:</p>
|
|||
<span class="n">http2_session_data</span> <span class="o">*</span><span class="n">session_data</span><span class="p">;</span>
|
||||
|
||||
<span class="n">session_data</span> <span class="o">=</span> <span class="n">create_http2_session_data</span><span class="p">(</span><span class="n">app_ctx</span><span class="p">,</span> <span class="n">fd</span><span class="p">,</span> <span class="n">addr</span><span class="p">,</span> <span class="n">addrlen</span><span class="p">);</span>
|
||||
<span class="n">bufferevent_setcb</span><span class="p">(</span><span class="n">session_data</span><span class="o">-></span><span class="n">bev</span><span class="p">,</span> <span class="n">handshake_readcb</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">,</span> <span class="n">eventcb</span><span class="p">,</span>
|
||||
<span class="n">session_data</span><span class="p">);</span>
|
||||
|
||||
<span class="n">bufferevent_setcb</span><span class="p">(</span><span class="n">session_data</span><span class="o">-></span><span class="n">bev</span><span class="p">,</span> <span class="n">readcb</span><span class="p">,</span> <span class="n">writecb</span><span class="p">,</span> <span class="n">eventcb</span><span class="p">,</span> <span class="n">session_data</span><span class="p">);</span>
|
||||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Here we create the <tt class="docutils literal"><span class="pre">http2_session_data</span></tt> object. The bufferevent for this
|
||||
connection is also initialized at this time. We specify two callbacks for the
|
||||
bufferevent: <tt class="docutils literal"><span class="pre">handshake_readcb</span></tt> and <tt class="docutils literal"><span class="pre">eventcb</span></tt>.</p>
|
||||
<p>Here we create the <tt class="docutils literal"><span class="pre">http2_session_data</span></tt> object. The bufferevent for
|
||||
this connection is also initialized at this time. We specify three
|
||||
callbacks for the bufferevent: <tt class="docutils literal"><span class="pre">readcb</span></tt>, <tt class="docutils literal"><span class="pre">writecb</span></tt> and
|
||||
<tt class="docutils literal"><span class="pre">eventcb</span></tt>.</p>
|
||||
<p>The <tt class="docutils literal"><span class="pre">eventcb()</span></tt> callback is invoked by the libevent event loop when an event
|
||||
(e.g., connection has been established, timeout, etc) happens on the
|
||||
underlying network socket:</p>
|
||||
|
@ -350,6 +350,14 @@ underlying network socket:</p>
|
|||
<span class="n">http2_session_data</span> <span class="o">*</span><span class="n">session_data</span> <span class="o">=</span> <span class="p">(</span><span class="n">http2_session_data</span><span class="o">*</span><span class="p">)</span><span class="n">ptr</span><span class="p">;</span>
|
||||
<span class="k">if</span><span class="p">(</span><span class="n">events</span> <span class="o">&</span> <span class="n">BEV_EVENT_CONNECTED</span><span class="p">)</span> <span class="p">{</span>
|
||||
<span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">"%s connected</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">session_data</span><span class="o">-></span><span class="n">client_addr</span><span class="p">);</span>
|
||||
|
||||
<span class="n">initialize_nghttp2_session</span><span class="p">(</span><span class="n">session_data</span><span class="p">);</span>
|
||||
|
||||
<span class="k">if</span><span class="p">(</span><span class="n">send_server_connection_header</span><span class="p">(</span><span class="n">session_data</span><span class="p">)</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">)</span> <span class="p">{</span>
|
||||
<span class="n">delete_http2_session_data</span><span class="p">(</span><span class="n">session_data</span><span class="p">);</span>
|
||||
<span class="k">return</span><span class="p">;</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">events</span> <span class="o">&</span> <span class="n">BEV_EVENT_EOF</span><span class="p">)</span> <span class="p">{</span>
|
||||
|
@ -363,57 +371,27 @@ underlying network socket:</p>
|
|||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>For the <tt class="docutils literal"><span class="pre">BEV_EVENT_EOF</span></tt>, <tt class="docutils literal"><span class="pre">BEV_EVENT_ERROR</span></tt> and <tt class="docutils literal"><span class="pre">BEV_EVENT_TIMEOUT</span></tt>
|
||||
events, we just simply tear down the connection. The
|
||||
<tt class="docutils literal"><span class="pre">delete_http2_session_data()</span></tt> function destroys the <tt class="docutils literal"><span class="pre">http2_session_data</span></tt>
|
||||
object and thus also its bufferevent member. As a result, the underlying
|
||||
connection is closed. The <tt class="docutils literal"><span class="pre">BEV_EVENT_CONNECTED</span></tt> event is invoked when
|
||||
SSL/TLS handshake is finished successfully.</p>
|
||||
<p><tt class="docutils literal"><span class="pre">handshake_readcb()</span></tt> is a callback function to handle a 24 bytes magic byte
|
||||
string coming from a client, since the nghttp2 library does not handle it:</p>
|
||||
<div class="highlight-c"><div class="highlight"><pre><span class="k">static</span> <span class="kt">void</span> <span class="nf">handshake_readcb</span><span class="p">(</span><span class="k">struct</span> <span class="n">bufferevent</span> <span class="o">*</span><span class="n">bev</span><span class="p">,</span> <span class="kt">void</span> <span class="o">*</span><span class="n">ptr</span><span class="p">)</span>
|
||||
<span class="p">{</span>
|
||||
<span class="n">http2_session_data</span> <span class="o">*</span><span class="n">session_data</span> <span class="o">=</span> <span class="p">(</span><span class="n">http2_session_data</span><span class="o">*</span><span class="p">)</span><span class="n">ptr</span><span class="p">;</span>
|
||||
<span class="kt">uint8_t</span> <span class="n">data</span><span class="p">[</span><span class="mi">24</span><span class="p">];</span>
|
||||
<span class="k">struct</span> <span class="n">evbuffer</span> <span class="o">*</span><span class="n">input</span> <span class="o">=</span> <span class="n">bufferevent_get_input</span><span class="p">(</span><span class="n">session_data</span><span class="o">-></span><span class="n">bev</span><span class="p">);</span>
|
||||
<span class="kt">int</span> <span class="n">readlen</span> <span class="o">=</span> <span class="n">evbuffer_remove</span><span class="p">(</span><span class="n">input</span><span class="p">,</span> <span class="n">data</span><span class="p">,</span> <span class="n">session_data</span><span class="o">-></span><span class="n">handshake_leftlen</span><span class="p">);</span>
|
||||
<span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">conhead</span> <span class="o">=</span> <span class="n">NGHTTP2_CLIENT_CONNECTION_PREFACE</span><span class="p">;</span>
|
||||
|
||||
<span class="k">if</span><span class="p">(</span><span class="n">memcmp</span><span class="p">(</span><span class="n">conhead</span> <span class="o">+</span> <span class="n">NGHTTP2_CLIENT_CONNECTION_PREFACE_LEN</span>
|
||||
<span class="o">-</span> <span class="n">session_data</span><span class="o">-></span><span class="n">handshake_leftlen</span><span class="p">,</span> <span class="n">data</span><span class="p">,</span> <span class="n">readlen</span><span class="p">)</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">)</span> <span class="p">{</span>
|
||||
<span class="n">delete_http2_session_data</span><span class="p">(</span><span class="n">session_data</span><span class="p">);</span>
|
||||
<span class="k">return</span><span class="p">;</span>
|
||||
<span class="p">}</span>
|
||||
<span class="n">session_data</span><span class="o">-></span><span class="n">handshake_leftlen</span> <span class="o">-=</span> <span class="n">readlen</span><span class="p">;</span>
|
||||
<span class="k">if</span><span class="p">(</span><span class="n">session_data</span><span class="o">-></span><span class="n">handshake_leftlen</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="p">{</span>
|
||||
<span class="n">bufferevent_setcb</span><span class="p">(</span><span class="n">session_data</span><span class="o">-></span><span class="n">bev</span><span class="p">,</span> <span class="n">readcb</span><span class="p">,</span> <span class="n">writecb</span><span class="p">,</span> <span class="n">eventcb</span><span class="p">,</span> <span class="n">ptr</span><span class="p">);</span>
|
||||
<span class="cm">/* Process pending data in buffer since they are not notified</span>
|
||||
<span class="cm"> further */</span>
|
||||
<span class="n">initialize_nghttp2_session</span><span class="p">(</span><span class="n">session_data</span><span class="p">);</span>
|
||||
<span class="k">if</span><span class="p">(</span><span class="n">send_server_connection_header</span><span class="p">(</span><span class="n">session_data</span><span class="p">)</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">)</span> <span class="p">{</span>
|
||||
<span class="n">delete_http2_session_data</span><span class="p">(</span><span class="n">session_data</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">session_recv</span><span class="p">(</span><span class="n">session_data</span><span class="p">)</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">)</span> <span class="p">{</span>
|
||||
<span class="n">delete_http2_session_data</span><span class="p">(</span><span class="n">session_data</span><span class="p">);</span>
|
||||
<span class="k">return</span><span class="p">;</span>
|
||||
<span class="p">}</span>
|
||||
<span class="p">}</span>
|
||||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>We check that the received byte string matches
|
||||
<a class="reference internal" href="apiref.html#c.NGHTTP2_CLIENT_CONNECTION_PREFACE" title="NGHTTP2_CLIENT_CONNECTION_PREFACE"><tt class="xref c c-macro docutils literal"><span class="pre">NGHTTP2_CLIENT_CONNECTION_PREFACE</span></tt></a>. When they match, the connection
|
||||
state is ready to start the HTTP/2 communication. First we change the callback
|
||||
functions for the bufferevent object. We use the same <tt class="docutils literal"><span class="pre">eventcb</span></tt> callback as
|
||||
before, but we specify new <tt class="docutils literal"><span class="pre">readcb</span></tt> and <tt class="docutils literal"><span class="pre">writecb</span></tt> functions to handle the
|
||||
HTTP/2 communication. These two functions are described later.</p>
|
||||
<p>For the <tt class="docutils literal"><span class="pre">BEV_EVENT_EOF</span></tt>, <tt class="docutils literal"><span class="pre">BEV_EVENT_ERROR</span></tt> and
|
||||
<tt class="docutils literal"><span class="pre">BEV_EVENT_TIMEOUT</span></tt> events, we just simply tear down the connection.
|
||||
The <tt class="docutils literal"><span class="pre">delete_http2_session_data()</span></tt> function destroys the
|
||||
<tt class="docutils literal"><span class="pre">http2_session_data</span></tt> object and thus also its bufferevent member.
|
||||
As a result, the underlying connection is closed. The
|
||||
<tt class="docutils literal"><span class="pre">BEV_EVENT_CONNECTED</span></tt> event is invoked when SSL/TLS handshake is
|
||||
finished successfully. Now we are ready to start the HTTP/2
|
||||
communication.</p>
|
||||
<p>We initialize a nghttp2 session object which is done in
|
||||
<tt class="docutils literal"><span class="pre">initialize_nghttp2_session()</span></tt>:</p>
|
||||
<div class="highlight-c"><div class="highlight"><pre><span class="k">static</span> <span class="kt">void</span> <span class="nf">initialize_nghttp2_session</span><span class="p">(</span><span class="n">http2_session_data</span> <span class="o">*</span><span class="n">session_data</span><span class="p">)</span>
|
||||
<span class="p">{</span>
|
||||
<span class="n">nghttp2_option</span> <span class="o">*</span><span class="n">option</span><span class="p">;</span>
|
||||
<span class="n">nghttp2_session_callbacks</span> <span class="o">*</span><span class="n">callbacks</span><span class="p">;</span>
|
||||
|
||||
<span class="n">nghttp2_option_new</span><span class="p">(</span><span class="o">&</span><span class="n">option</span><span class="p">);</span>
|
||||
|
||||
<span class="cm">/* Tells nghttp2_session object that it handles client connection</span>
|
||||
<span class="cm"> preface */</span>
|
||||
<span class="n">nghttp2_option_set_recv_client_preface</span><span class="p">(</span><span class="n">option</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
|
||||
|
||||
<span class="n">nghttp2_session_callbacks_new</span><span class="p">(</span><span class="o">&</span><span class="n">callbacks</span><span class="p">);</span>
|
||||
|
||||
<span class="n">nghttp2_session_callbacks_set_send_callback</span><span class="p">(</span><span class="n">callbacks</span><span class="p">,</span> <span class="n">send_callback</span><span class="p">);</span>
|
||||
|
@ -430,15 +408,23 @@ HTTP/2 communication. These two functions are described later.</p>
|
|||
<span class="n">nghttp2_session_callbacks_set_on_begin_headers_callback</span>
|
||||
<span class="p">(</span><span class="n">callbacks</span><span class="p">,</span> <span class="n">on_begin_headers_callback</span><span class="p">);</span>
|
||||
|
||||
<span class="n">nghttp2_session_server_new</span><span class="p">(</span><span class="o">&</span><span class="n">session_data</span><span class="o">-></span><span class="n">session</span><span class="p">,</span> <span class="n">callbacks</span><span class="p">,</span> <span class="n">session_data</span><span class="p">);</span>
|
||||
|
||||
|
||||
<span class="n">nghttp2_session_server_new2</span><span class="p">(</span><span class="o">&</span><span class="n">session_data</span><span class="o">-></span><span class="n">session</span><span class="p">,</span> <span class="n">callbacks</span><span class="p">,</span> <span class="n">session_data</span><span class="p">,</span>
|
||||
<span class="n">option</span><span class="p">);</span>
|
||||
|
||||
<span class="n">nghttp2_session_callbacks_del</span><span class="p">(</span><span class="n">callbacks</span><span class="p">);</span>
|
||||
<span class="n">nghttp2_option_del</span><span class="p">(</span><span class="n">option</span><span class="p">);</span>
|
||||
<span class="p">}</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Since we are creating a server, the nghttp2 session object is created using
|
||||
<a class="reference internal" href="apiref.html#c.nghttp2_session_server_new" title="nghttp2_session_server_new"><tt class="xref c c-func docutils literal"><span class="pre">nghttp2_session_server_new()</span></tt></a> function. We registers five callbacks for
|
||||
nghttp2 session object. We’ll talk about these callbacks later.</p>
|
||||
<p>Since we are creating a server and uses options, the nghttp2 session
|
||||
object is created using <a class="reference internal" href="apiref.html#c.nghttp2_session_server_new2" title="nghttp2_session_server_new2"><tt class="xref c c-func docutils literal"><span class="pre">nghttp2_session_server_new2()</span></tt></a> function. We
|
||||
registers five callbacks for nghttp2 session object. We’ll talk about
|
||||
these callbacks later. Our server only speaks HTTP/2. In this case,
|
||||
we use <a class="reference internal" href="apiref.html#c.nghttp2_option_set_recv_client_preface" title="nghttp2_option_set_recv_client_preface"><tt class="xref c c-func docutils literal"><span class="pre">nghttp2_option_set_recv_client_preface()</span></tt></a> to make
|
||||
<a class="reference internal" href="apiref.html#c.nghttp2_session" title="nghttp2_session"><tt class="xref c c-type docutils literal"><span class="pre">nghttp2_session</span></tt></a> object handle client connection preface, which
|
||||
saves some lines of application code.</p>
|
||||
<p>After initialization of the nghttp2 session object, we are going to send
|
||||
a server connection header in <tt class="docutils literal"><span class="pre">send_server_connection_header()</span></tt>:</p>
|
||||
<div class="highlight-c"><div class="highlight"><pre><span class="k">static</span> <span class="kt">int</span> <span class="nf">send_server_connection_header</span><span class="p">(</span><span class="n">http2_session_data</span> <span class="o">*</span><span class="n">session_data</span><span class="p">)</span>
|
||||
|
@ -840,7 +826,6 @@ is about to close and we no longer use that object.</p>
|
|||
<span class="n">app_context</span> <span class="o">*</span><span class="n">app_ctx</span><span class="p">;</span>
|
||||
<span class="n">nghttp2_session</span> <span class="o">*</span><span class="n">session</span><span class="p">;</span>
|
||||
<span class="kt">char</span> <span class="o">*</span><span class="n">client_addr</span><span class="p">;</span>
|
||||
<span class="kt">size_t</span> <span class="n">handshake_leftlen</span><span class="p">;</span>
|
||||
<span class="p">}</span> <span class="n">http2_session_data</span><span class="p">;</span>
|
||||
|
||||
<span class="k">struct</span> <span class="n">app_context</span> <span class="p">{</span>
|
||||
|
@ -963,7 +948,6 @@ is about to close and we no longer use that object.</p>
|
|||
<span class="p">(</span><span class="n">app_ctx</span><span class="o">-></span><span class="n">evbase</span><span class="p">,</span> <span class="n">fd</span><span class="p">,</span> <span class="n">ssl</span><span class="p">,</span>
|
||||
<span class="n">BUFFEREVENT_SSL_ACCEPTING</span><span class="p">,</span>
|
||||
<span class="n">BEV_OPT_CLOSE_ON_FREE</span> <span class="o">|</span> <span class="n">BEV_OPT_DEFER_CALLBACKS</span><span class="p">);</span>
|
||||
<span class="n">session_data</span><span class="o">-></span><span class="n">handshake_leftlen</span> <span class="o">=</span> <span class="n">NGHTTP2_CLIENT_CONNECTION_PREFACE_LEN</span><span class="p">;</span>
|
||||
<span class="n">rv</span> <span class="o">=</span> <span class="n">getnameinfo</span><span class="p">(</span><span class="n">addr</span><span class="p">,</span> <span class="n">addrlen</span><span class="p">,</span> <span class="n">host</span><span class="p">,</span> <span class="k">sizeof</span><span class="p">(</span><span class="n">host</span><span class="p">),</span> <span class="nb">NULL</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="n">NI_NUMERICHOST</span><span class="p">);</span>
|
||||
<span class="k">if</span><span class="p">(</span><span class="n">rv</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">)</span> <span class="p">{</span>
|
||||
<span class="n">session_data</span><span class="o">-></span><span class="n">client_addr</span> <span class="o">=</span> <span class="n">strdup</span><span class="p">(</span><span class="s">"(unknown)"</span><span class="p">);</span>
|
||||
|
@ -1326,8 +1310,15 @@ is about to close and we no longer use that object.</p>
|
|||
|
||||
<span class="k">static</span> <span class="kt">void</span> <span class="nf">initialize_nghttp2_session</span><span class="p">(</span><span class="n">http2_session_data</span> <span class="o">*</span><span class="n">session_data</span><span class="p">)</span>
|
||||
<span class="p">{</span>
|
||||
<span class="n">nghttp2_option</span> <span class="o">*</span><span class="n">option</span><span class="p">;</span>
|
||||
<span class="n">nghttp2_session_callbacks</span> <span class="o">*</span><span class="n">callbacks</span><span class="p">;</span>
|
||||
|
||||
<span class="n">nghttp2_option_new</span><span class="p">(</span><span class="o">&</span><span class="n">option</span><span class="p">);</span>
|
||||
|
||||
<span class="cm">/* Tells nghttp2_session object that it handles client connection</span>
|
||||
<span class="cm"> preface */</span>
|
||||
<span class="n">nghttp2_option_set_recv_client_preface</span><span class="p">(</span><span class="n">option</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span>
|
||||
|
||||
<span class="n">nghttp2_session_callbacks_new</span><span class="p">(</span><span class="o">&</span><span class="n">callbacks</span><span class="p">);</span>
|
||||
|
||||
<span class="n">nghttp2_session_callbacks_set_send_callback</span><span class="p">(</span><span class="n">callbacks</span><span class="p">,</span> <span class="n">send_callback</span><span class="p">);</span>
|
||||
|
@ -1344,9 +1335,13 @@ is about to close and we no longer use that object.</p>
|
|||
<span class="n">nghttp2_session_callbacks_set_on_begin_headers_callback</span>
|
||||
<span class="p">(</span><span class="n">callbacks</span><span class="p">,</span> <span class="n">on_begin_headers_callback</span><span class="p">);</span>
|
||||
|
||||
<span class="n">nghttp2_session_server_new</span><span class="p">(</span><span class="o">&</span><span class="n">session_data</span><span class="o">-></span><span class="n">session</span><span class="p">,</span> <span class="n">callbacks</span><span class="p">,</span> <span class="n">session_data</span><span class="p">);</span>
|
||||
|
||||
|
||||
<span class="n">nghttp2_session_server_new2</span><span class="p">(</span><span class="o">&</span><span class="n">session_data</span><span class="o">-></span><span class="n">session</span><span class="p">,</span> <span class="n">callbacks</span><span class="p">,</span> <span class="n">session_data</span><span class="p">,</span>
|
||||
<span class="n">option</span><span class="p">);</span>
|
||||
|
||||
<span class="n">nghttp2_session_callbacks_del</span><span class="p">(</span><span class="n">callbacks</span><span class="p">);</span>
|
||||
<span class="n">nghttp2_option_del</span><span class="p">(</span><span class="n">option</span><span class="p">);</span>
|
||||
<span class="p">}</span>
|
||||
|
||||
<span class="cm">/* Send HTTP/2 client connection header, which includes 24 bytes</span>
|
||||
|
@ -1409,6 +1404,14 @@ is about to close and we no longer use that object.</p>
|
|||
<span class="n">http2_session_data</span> <span class="o">*</span><span class="n">session_data</span> <span class="o">=</span> <span class="p">(</span><span class="n">http2_session_data</span><span class="o">*</span><span class="p">)</span><span class="n">ptr</span><span class="p">;</span>
|
||||
<span class="k">if</span><span class="p">(</span><span class="n">events</span> <span class="o">&</span> <span class="n">BEV_EVENT_CONNECTED</span><span class="p">)</span> <span class="p">{</span>
|
||||
<span class="n">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">"%s connected</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="n">session_data</span><span class="o">-></span><span class="n">client_addr</span><span class="p">);</span>
|
||||
|
||||
<span class="n">initialize_nghttp2_session</span><span class="p">(</span><span class="n">session_data</span><span class="p">);</span>
|
||||
|
||||
<span class="k">if</span><span class="p">(</span><span class="n">send_server_connection_header</span><span class="p">(</span><span class="n">session_data</span><span class="p">)</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">)</span> <span class="p">{</span>
|
||||
<span class="n">delete_http2_session_data</span><span class="p">(</span><span class="n">session_data</span><span class="p">);</span>
|
||||
<span class="k">return</span><span class="p">;</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">events</span> <span class="o">&</span> <span class="n">BEV_EVENT_EOF</span><span class="p">)</span> <span class="p">{</span>
|
||||
|
@ -1421,38 +1424,6 @@ is about to close and we no longer use that object.</p>
|
|||
<span class="n">delete_http2_session_data</span><span class="p">(</span><span class="n">session_data</span><span class="p">);</span>
|
||||
<span class="p">}</span>
|
||||
|
||||
<span class="cm">/* readcb for bufferevent to check first 24 bytes client connection</span>
|
||||
<span class="cm"> header. */</span>
|
||||
<span class="k">static</span> <span class="kt">void</span> <span class="nf">handshake_readcb</span><span class="p">(</span><span class="k">struct</span> <span class="n">bufferevent</span> <span class="o">*</span><span class="n">bev</span><span class="p">,</span> <span class="kt">void</span> <span class="o">*</span><span class="n">ptr</span><span class="p">)</span>
|
||||
<span class="p">{</span>
|
||||
<span class="n">http2_session_data</span> <span class="o">*</span><span class="n">session_data</span> <span class="o">=</span> <span class="p">(</span><span class="n">http2_session_data</span><span class="o">*</span><span class="p">)</span><span class="n">ptr</span><span class="p">;</span>
|
||||
<span class="kt">uint8_t</span> <span class="n">data</span><span class="p">[</span><span class="mi">24</span><span class="p">];</span>
|
||||
<span class="k">struct</span> <span class="n">evbuffer</span> <span class="o">*</span><span class="n">input</span> <span class="o">=</span> <span class="n">bufferevent_get_input</span><span class="p">(</span><span class="n">session_data</span><span class="o">-></span><span class="n">bev</span><span class="p">);</span>
|
||||
<span class="kt">int</span> <span class="n">readlen</span> <span class="o">=</span> <span class="n">evbuffer_remove</span><span class="p">(</span><span class="n">input</span><span class="p">,</span> <span class="n">data</span><span class="p">,</span> <span class="n">session_data</span><span class="o">-></span><span class="n">handshake_leftlen</span><span class="p">);</span>
|
||||
<span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">conhead</span> <span class="o">=</span> <span class="n">NGHTTP2_CLIENT_CONNECTION_PREFACE</span><span class="p">;</span>
|
||||
|
||||
<span class="k">if</span><span class="p">(</span><span class="n">memcmp</span><span class="p">(</span><span class="n">conhead</span> <span class="o">+</span> <span class="n">NGHTTP2_CLIENT_CONNECTION_PREFACE_LEN</span>
|
||||
<span class="o">-</span> <span class="n">session_data</span><span class="o">-></span><span class="n">handshake_leftlen</span><span class="p">,</span> <span class="n">data</span><span class="p">,</span> <span class="n">readlen</span><span class="p">)</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">)</span> <span class="p">{</span>
|
||||
<span class="n">delete_http2_session_data</span><span class="p">(</span><span class="n">session_data</span><span class="p">);</span>
|
||||
<span class="k">return</span><span class="p">;</span>
|
||||
<span class="p">}</span>
|
||||
<span class="n">session_data</span><span class="o">-></span><span class="n">handshake_leftlen</span> <span class="o">-=</span> <span class="n">readlen</span><span class="p">;</span>
|
||||
<span class="k">if</span><span class="p">(</span><span class="n">session_data</span><span class="o">-></span><span class="n">handshake_leftlen</span> <span class="o">==</span> <span class="mi">0</span><span class="p">)</span> <span class="p">{</span>
|
||||
<span class="n">bufferevent_setcb</span><span class="p">(</span><span class="n">session_data</span><span class="o">-></span><span class="n">bev</span><span class="p">,</span> <span class="n">readcb</span><span class="p">,</span> <span class="n">writecb</span><span class="p">,</span> <span class="n">eventcb</span><span class="p">,</span> <span class="n">ptr</span><span class="p">);</span>
|
||||
<span class="cm">/* Process pending data in buffer since they are not notified</span>
|
||||
<span class="cm"> further */</span>
|
||||
<span class="n">initialize_nghttp2_session</span><span class="p">(</span><span class="n">session_data</span><span class="p">);</span>
|
||||
<span class="k">if</span><span class="p">(</span><span class="n">send_server_connection_header</span><span class="p">(</span><span class="n">session_data</span><span class="p">)</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">)</span> <span class="p">{</span>
|
||||
<span class="n">delete_http2_session_data</span><span class="p">(</span><span class="n">session_data</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">session_recv</span><span class="p">(</span><span class="n">session_data</span><span class="p">)</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">)</span> <span class="p">{</span>
|
||||
<span class="n">delete_http2_session_data</span><span class="p">(</span><span class="n">session_data</span><span class="p">);</span>
|
||||
<span class="k">return</span><span class="p">;</span>
|
||||
<span class="p">}</span>
|
||||
<span class="p">}</span>
|
||||
<span class="p">}</span>
|
||||
|
||||
<span class="cm">/* callback for evconnlistener */</span>
|
||||
<span class="k">static</span> <span class="kt">void</span> <span class="nf">acceptcb</span><span class="p">(</span><span class="k">struct</span> <span class="n">evconnlistener</span> <span class="o">*</span><span class="n">listener</span><span class="p">,</span> <span class="kt">int</span> <span class="n">fd</span><span class="p">,</span>
|
||||
<span class="k">struct</span> <span class="n">sockaddr</span> <span class="o">*</span><span class="n">addr</span><span class="p">,</span> <span class="kt">int</span> <span class="n">addrlen</span><span class="p">,</span> <span class="kt">void</span> <span class="o">*</span><span class="n">arg</span><span class="p">)</span>
|
||||
|
@ -1461,8 +1432,8 @@ is about to close and we no longer use that object.</p>
|
|||
<span class="n">http2_session_data</span> <span class="o">*</span><span class="n">session_data</span><span class="p">;</span>
|
||||
|
||||
<span class="n">session_data</span> <span class="o">=</span> <span class="n">create_http2_session_data</span><span class="p">(</span><span class="n">app_ctx</span><span class="p">,</span> <span class="n">fd</span><span class="p">,</span> <span class="n">addr</span><span class="p">,</span> <span class="n">addrlen</span><span class="p">);</span>
|
||||
<span class="n">bufferevent_setcb</span><span class="p">(</span><span class="n">session_data</span><span class="o">-></span><span class="n">bev</span><span class="p">,</span> <span class="n">handshake_readcb</span><span class="p">,</span> <span class="nb">NULL</span><span class="p">,</span> <span class="n">eventcb</span><span class="p">,</span>
|
||||
<span class="n">session_data</span><span class="p">);</span>
|
||||
|
||||
<span class="n">bufferevent_setcb</span><span class="p">(</span><span class="n">session_data</span><span class="o">-></span><span class="n">bev</span><span class="p">,</span> <span class="n">readcb</span><span class="p">,</span> <span class="n">writecb</span><span class="p">,</span> <span class="n">eventcb</span><span class="p">,</span> <span class="n">session_data</span><span class="p">);</span>
|
||||
<span class="p">}</span>
|
||||
|
||||
<span class="k">static</span> <span class="kt">void</span> <span class="nf">start_listen</span><span class="p">(</span><span class="k">struct</span> <span class="n">event_base</span> <span class="o">*</span><span class="n">evbase</span><span class="p">,</span> <span class="k">const</span> <span class="kt">char</span> <span class="o">*</span><span class="n">service</span><span class="p">,</span>
|
||||
|
@ -1589,7 +1560,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.0-DEV',
|
||||
VERSION:'0.6.2-DEV',
|
||||
COLLAPSE_INDEX:false,
|
||||
FILE_SUFFIX:'.html',
|
||||
HAS_SOURCE: false
|
||||
|
|
Loading…
Reference in New Issue