Update doc
This commit is contained in:
parent
f9437ecf48
commit
f6c288b05b
20
apiref.html
20
apiref.html
|
@ -2364,6 +2364,20 @@ local endpoint can send without WINDOW_UPDATE.</p>
|
|||
<p>This function returns -1 if it fails.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="function">
|
||||
<dt id="c.nghttp2_session_get_stream_local_close">
|
||||
int <tt class="descname">nghttp2_session_get_stream_local_close</tt><big>(</big><a class="reference internal" href="#c.nghttp2_session" title="nghttp2_session">nghttp2_session</a>*<em> session</em>, int32_t<em> stream_id</em><big>)</big><a class="headerlink" href="#c.nghttp2_session_get_stream_local_close" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Returns 1 if local peer half closed the given stream <em>stream_id</em>.
|
||||
Returns 0 if it did not. Returns -1 if no such stream exists.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="function">
|
||||
<dt id="c.nghttp2_session_get_stream_remote_close">
|
||||
int <tt class="descname">nghttp2_session_get_stream_remote_close</tt><big>(</big><a class="reference internal" href="#c.nghttp2_session" title="nghttp2_session">nghttp2_session</a>*<em> session</em>, int32_t<em> stream_id</em><big>)</big><a class="headerlink" href="#c.nghttp2_session_get_stream_remote_close" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Returns 1 if remote peer half closed the given stream <em>stream_id</em>.
|
||||
Returns 0 if it did not. Returns -1 if no such stream exists.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="function">
|
||||
<dt id="c.nghttp2_session_terminate_session">
|
||||
int <tt class="descname">nghttp2_session_terminate_session</tt><big>(</big><a class="reference internal" href="#c.nghttp2_session" title="nghttp2_session">nghttp2_session</a><em> *session</em>, <a class="reference internal" href="#c.nghttp2_error_code" title="nghttp2_error_code">nghttp2_error_code</a><em> error_code</em><big>)</big><a class="headerlink" href="#c.nghttp2_session_terminate_session" title="Permalink to this definition">¶</a></dt>
|
||||
|
@ -2792,7 +2806,7 @@ called for this frame.</p>
|
|||
|
||||
<dl class="function">
|
||||
<dt id="c.nghttp2_submit_ping">
|
||||
int <tt class="descname">nghttp2_submit_ping</tt><big>(</big><a class="reference internal" href="#c.nghttp2_session" title="nghttp2_session">nghttp2_session</a><em> *session</em>, uint8_t<em> flags</em>, uint8_t<em> *opaque_data</em><big>)</big><a class="headerlink" href="#c.nghttp2_submit_ping" title="Permalink to this definition">¶</a></dt>
|
||||
int <tt class="descname">nghttp2_submit_ping</tt><big>(</big><a class="reference internal" href="#c.nghttp2_session" title="nghttp2_session">nghttp2_session</a><em> *session</em>, uint8_t<em> flags</em>, const uint8_t<em> *opaque_data</em><big>)</big><a class="headerlink" href="#c.nghttp2_submit_ping" title="Permalink to this definition">¶</a></dt>
|
||||
<dd><p>Submits PING frame. You don’t have to send PING back when you
|
||||
received PING frame. The library automatically submits PING frame
|
||||
in this case.</p>
|
||||
|
@ -3148,7 +3162,7 @@ or one of the following negative error codes:</p>
|
|||
<div class="highlight-c"><div class="highlight"><pre><span class="kt">int</span> <span class="nf">inflate_header_block</span><span class="p">(</span><span class="n">nghttp2_hd_inflater</span> <span class="o">*</span><span class="n">hd_inflater</span><span class="p">,</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> <span class="kt">int</span> <span class="n">final</span><span class="p">)</span>
|
||||
<span class="p">{</span>
|
||||
<span class="kt">int</span> <span class="n">rv</span><span class="p">;</span>
|
||||
<span class="kt">ssize_t</span> <span class="n">rv</span><span class="p">;</span>
|
||||
|
||||
<span class="k">for</span><span class="p">(;;)</span> <span class="p">{</span>
|
||||
<span class="n">nghttp2_nv</span> <span class="n">nv</span><span class="p">;</span>
|
||||
|
@ -3158,7 +3172,7 @@ or one of the following negative error codes:</p>
|
|||
<span class="n">in</span><span class="p">,</span> <span class="n">inlen</span><span class="p">,</span> <span class="n">final</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">fprintf</span><span class="p">(</span><span class="n">stderr</span><span class="p">,</span> <span class="s">"inflate failed with error code %d"</span><span class="p">,</span> <span class="n">rv</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">"inflate failed with error code %zd"</span><span class="p">,</span> <span class="n">rv</span><span class="p">);</span>
|
||||
<span class="k">return</span> <span class="o">-</span><span class="mi">1</span><span class="p">;</span>
|
||||
<span class="p">}</span>
|
||||
|
||||
|
|
|
@ -869,12 +869,12 @@
|
|||
<dt><a href="apiref.html#c.nghttp2_info.proto_str">nghttp2_info.proto_str (C member)</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="apiref.html#c.nghttp2_info.version_num">nghttp2_info.version_num (C member)</a>
|
||||
</dt>
|
||||
|
||||
</dl></td>
|
||||
<td style="width: 33%" valign="top"><dl>
|
||||
|
||||
<dt><a href="apiref.html#c.nghttp2_info.version_str">nghttp2_info.version_str (C member)</a>
|
||||
</dt>
|
||||
|
@ -1248,6 +1248,14 @@
|
|||
</dt>
|
||||
|
||||
|
||||
<dt><a href="apiref.html#c.nghttp2_session_get_stream_local_close">nghttp2_session_get_stream_local_close (C function)</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="apiref.html#c.nghttp2_session_get_stream_remote_close">nghttp2_session_get_stream_remote_close (C function)</a>
|
||||
</dt>
|
||||
|
||||
|
||||
<dt><a href="apiref.html#c.nghttp2_session_get_stream_remote_window_size">nghttp2_session_get_stream_remote_window_size (C function)</a>
|
||||
</dt>
|
||||
|
||||
|
|
|
@ -2153,6 +2153,25 @@
|
|||
<span class="kt">int32_t</span> <span class="nf">nghttp2_session_get_stream_remote_window_size</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">int32_t</span> <span class="n">stream_id</span><span class="p">);</span>
|
||||
|
||||
|
||||
<span class="cm">/**</span>
|
||||
<span class="cm"> * @function</span>
|
||||
<span class="cm"> *</span>
|
||||
<span class="cm"> * Returns 1 if local peer half closed the given stream |stream_id|.</span>
|
||||
<span class="cm"> * Returns 0 if it did not. Returns -1 if no such stream exists.</span>
|
||||
<span class="cm"> */</span>
|
||||
<span class="kt">int</span> <span class="nf">nghttp2_session_get_stream_local_close</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">int32_t</span> <span class="n">stream_id</span><span class="p">);</span>
|
||||
|
||||
<span class="cm">/**</span>
|
||||
<span class="cm"> * @function</span>
|
||||
<span class="cm"> *</span>
|
||||
<span class="cm"> * Returns 1 if remote peer half closed the given stream |stream_id|.</span>
|
||||
<span class="cm"> * Returns 0 if it did not. Returns -1 if no such stream exists.</span>
|
||||
<span class="cm"> */</span>
|
||||
<span class="kt">int</span> <span class="nf">nghttp2_session_get_stream_remote_close</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">int32_t</span> <span class="n">stream_id</span><span class="p">);</span>
|
||||
|
||||
<span class="cm">/**</span>
|
||||
<span class="cm"> * @function</span>
|
||||
<span class="cm"> *</span>
|
||||
|
@ -2698,7 +2717,7 @@
|
|||
<span class="cm"> * Out of memory.</span>
|
||||
<span class="cm"> */</span>
|
||||
<span class="kt">int</span> <span class="nf">nghttp2_submit_ping</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">uint8_t</span> <span class="n">flags</span><span class="p">,</span>
|
||||
<span class="kt">uint8_t</span> <span class="o">*</span><span class="n">opaque_data</span><span class="p">);</span>
|
||||
<span class="k">const</span> <span class="kt">uint8_t</span> <span class="o">*</span><span class="n">opaque_data</span><span class="p">);</span>
|
||||
|
||||
<span class="cm">/**</span>
|
||||
<span class="cm"> * @function</span>
|
||||
|
@ -3147,7 +3166,7 @@
|
|||
<span class="cm"> * int inflate_header_block(nghttp2_hd_inflater *hd_inflater,</span>
|
||||
<span class="cm"> * uint8_t *in, size_t inlen, int final)</span>
|
||||
<span class="cm"> * {</span>
|
||||
<span class="cm"> * int rv;</span>
|
||||
<span class="cm"> * ssize_t rv;</span>
|
||||
<span class="cm"> *</span>
|
||||
<span class="cm"> * for(;;) {</span>
|
||||
<span class="cm"> * nghttp2_nv nv;</span>
|
||||
|
@ -3157,7 +3176,7 @@
|
|||
<span class="cm"> * in, inlen, final);</span>
|
||||
<span class="cm"> *</span>
|
||||
<span class="cm"> * if(rv < 0) {</span>
|
||||
<span class="cm"> * fprintf(stderr, "inflate failed with error code %d", rv);</span>
|
||||
<span class="cm"> * fprintf(stderr, "inflate failed with error code %zd", rv);</span>
|
||||
<span class="cm"> * return -1;</span>
|
||||
<span class="cm"> * }</span>
|
||||
<span class="cm"> *</span>
|
||||
|
|
|
@ -307,7 +307,7 @@ that server, invoke nghttpx like this:</p>
|
|||
</div>
|
||||
<div class="admonition note">
|
||||
<p class="first admonition-title">Note</p>
|
||||
<p class="last">You may need <tt class="docutils literal"><span class="pre">-k</span></tt> option if HTTP/2 server’ss certificate is
|
||||
<p class="last">You may need <tt class="docutils literal"><span class="pre">-k</span></tt> option if HTTP/2 server’s certificate is
|
||||
self-signed. But please note that it is insecure.</p>
|
||||
</div>
|
||||
<p>Then you can use curl to issue HTTP request via HTTP/2 proxy:</p>
|
||||
|
@ -320,10 +320,12 @@ proxy.</p>
|
|||
<div class="section" id="http-2-bridge-mode">
|
||||
<h2>HTTP/2 bridge mode<a class="headerlink" href="#http-2-bridge-mode" title="Permalink to this headline">¶</a></h2>
|
||||
<p>If nghttpx is invoked with <tt class="docutils literal"><span class="pre">--http2-bridge</span></tt> option, it operates in
|
||||
HTTP/2 bridge mode. The supported protocols in frontend and backend
|
||||
connections are the same in <a class="reference internal" href="#default-mode">default mode</a>.</p>
|
||||
HTTP/2 bridge mode. The supported protocols in frontend connections
|
||||
are the same in <a class="reference internal" href="#default-mode">default mode</a>. The protocol in backend is HTTP/2
|
||||
only.</p>
|
||||
<p>With <tt class="docutils literal"><span class="pre">--frontend-no-tls</span></tt> option, SSL/TLS is turned off in frontend
|
||||
connection, so the connection gets insecure.</p>
|
||||
connection, so the connection gets insecure. To disable SSL/TLS in
|
||||
backend connection, use <tt class="docutils literal"><span class="pre">--backend-no-tls</span></tt> option.</p>
|
||||
<p>The backend server is supporsed to be a HTTP/2 web server or HTTP/2
|
||||
proxy. Since HTTP/2 requests opaque between proxied and non-proxied
|
||||
request, the backend server may be proxy or just web server depending
|
||||
|
|
BIN
objects.inv
BIN
objects.inv
Binary file not shown.
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue