Update doc
This commit is contained in:
parent
d813ae89f6
commit
33f5605c5c
|
@ -1904,10 +1904,11 @@ Functions
|
||||||
.. function:: int nghttp2_select_next_protocol(unsigned char **out, unsigned char *outlen, const unsigned char *in, unsigned int inlen)
|
.. function:: int nghttp2_select_next_protocol(unsigned char **out, unsigned char *outlen, const unsigned char *in, unsigned int inlen)
|
||||||
|
|
||||||
|
|
||||||
A helper function for dealing with NPN in client side. The *in*
|
A helper function for dealing with NPN in client side or ALPN in
|
||||||
contains server's protocol in preferable order. The format of *in*
|
server side. The *in* contains peer's protocol list in preferable
|
||||||
is length-prefixed and not null-terminated. For example,
|
order. The format of *in* is length-prefixed and not
|
||||||
``HTTP-draft-04/2.0`` and ``http/1.1`` stored in *in* like this::
|
null-terminated. For example, ``HTTP-draft-04/2.0`` and
|
||||||
|
``http/1.1`` stored in *in* like this::
|
||||||
|
|
||||||
in[0] = 17
|
in[0] = 17
|
||||||
in[1..17] = "HTTP-draft-04/2.0"
|
in[1..17] = "HTTP-draft-04/2.0"
|
||||||
|
@ -1917,10 +1918,10 @@ Functions
|
||||||
|
|
||||||
The selection algorithm is as follows:
|
The selection algorithm is as follows:
|
||||||
|
|
||||||
1. If server's list contains ``HTTP-draft-04/2.0``, it is selected
|
1. If peer's list contains HTTP/2.0 protocol the library supports,
|
||||||
and returns 1. The following step is not taken.
|
it is selected and returns 1. The following step is not taken.
|
||||||
|
|
||||||
2. If server's list contains ``http/1.1``, this function selects
|
2. If peer's list contains ``http/1.1``, this function selects
|
||||||
``http/1.1`` and returns 0. The following step is not taken.
|
``http/1.1`` and returns 0. The following step is not taken.
|
||||||
|
|
||||||
3. This function selects nothing and returns -1. (So called
|
3. This function selects nothing and returns -1. (So called
|
||||||
|
@ -1934,7 +1935,7 @@ Functions
|
||||||
See http://technotes.googlecode.com/git/nextprotoneg.html for more
|
See http://technotes.googlecode.com/git/nextprotoneg.html for more
|
||||||
details about NPN.
|
details about NPN.
|
||||||
|
|
||||||
To use this method you should do something like::
|
For NPN, to use this method you should do something like::
|
||||||
|
|
||||||
static int select_next_proto_cb(SSL* ssl,
|
static int select_next_proto_cb(SSL* ssl,
|
||||||
unsigned char **out,
|
unsigned char **out,
|
||||||
|
@ -1953,10 +1954,6 @@ Functions
|
||||||
...
|
...
|
||||||
SSL_CTX_set_next_proto_select_cb(ssl_ctx, select_next_proto_cb, my_obj);
|
SSL_CTX_set_next_proto_select_cb(ssl_ctx, select_next_proto_cb, my_obj);
|
||||||
|
|
||||||
Note that the HTTP/2.0 spec does use ALPN instead of NPN. This
|
|
||||||
function is provided for transitional period before ALPN is got
|
|
||||||
implemented in major SSL/TLS libraries.
|
|
||||||
|
|
||||||
|
|
||||||
.. function:: int nghttp2_gzip_inflate_new(nghttp2_gzip **inflater_ptr)
|
.. function:: int nghttp2_gzip_inflate_new(nghttp2_gzip **inflater_ptr)
|
||||||
|
|
||||||
|
|
20
apiref.html
20
apiref.html
|
@ -2433,10 +2433,11 @@ is found to be greater than rhs->name; or returns 0 otherwise.</p>
|
||||||
<dl class="function">
|
<dl class="function">
|
||||||
<dt id="nghttp2_select_next_protocol">
|
<dt id="nghttp2_select_next_protocol">
|
||||||
int <tt class="descname">nghttp2_select_next_protocol</tt><big>(</big>unsigned char<em> **out</em>, unsigned char<em> *outlen</em>, const unsigned char<em> *in</em>, unsigned int<em> inlen</em><big>)</big><a class="headerlink" href="#nghttp2_select_next_protocol" title="Permalink to this definition">¶</a></dt>
|
int <tt class="descname">nghttp2_select_next_protocol</tt><big>(</big>unsigned char<em> **out</em>, unsigned char<em> *outlen</em>, const unsigned char<em> *in</em>, unsigned int<em> inlen</em><big>)</big><a class="headerlink" href="#nghttp2_select_next_protocol" title="Permalink to this definition">¶</a></dt>
|
||||||
<dd><p>A helper function for dealing with NPN in client side. The <em>in</em>
|
<dd><p>A helper function for dealing with NPN in client side or ALPN in
|
||||||
contains server’s protocol in preferable order. The format of <em>in</em>
|
server side. The <em>in</em> contains peer’s protocol list in preferable
|
||||||
is length-prefixed and not null-terminated. For example,
|
order. The format of <em>in</em> is length-prefixed and not
|
||||||
<tt class="docutils literal"><span class="pre">HTTP-draft-04/2.0</span></tt> and <tt class="docutils literal"><span class="pre">http/1.1</span></tt> stored in <em>in</em> like this:</p>
|
null-terminated. For example, <tt class="docutils literal"><span class="pre">HTTP-draft-04/2.0</span></tt> and
|
||||||
|
<tt class="docutils literal"><span class="pre">http/1.1</span></tt> stored in <em>in</em> like this:</p>
|
||||||
<div class="highlight-c"><div class="highlight"><pre><span class="n">in</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">=</span> <span class="mi">17</span>
|
<div class="highlight-c"><div class="highlight"><pre><span class="n">in</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">=</span> <span class="mi">17</span>
|
||||||
<span class="n">in</span><span class="p">[</span><span class="mf">1..17</span><span class="p">]</span> <span class="o">=</span> <span class="s">"HTTP-draft-04/2.0"</span>
|
<span class="n">in</span><span class="p">[</span><span class="mf">1..17</span><span class="p">]</span> <span class="o">=</span> <span class="s">"HTTP-draft-04/2.0"</span>
|
||||||
<span class="n">in</span><span class="p">[</span><span class="mi">18</span><span class="p">]</span> <span class="o">=</span> <span class="mi">8</span>
|
<span class="n">in</span><span class="p">[</span><span class="mi">18</span><span class="p">]</span> <span class="o">=</span> <span class="mi">8</span>
|
||||||
|
@ -2446,9 +2447,9 @@ is length-prefixed and not null-terminated. For example,
|
||||||
</div>
|
</div>
|
||||||
<p>The selection algorithm is as follows:</p>
|
<p>The selection algorithm is as follows:</p>
|
||||||
<ol class="arabic simple">
|
<ol class="arabic simple">
|
||||||
<li>If server’s list contains <tt class="docutils literal"><span class="pre">HTTP-draft-04/2.0</span></tt>, it is selected
|
<li>If peer’s list contains HTTP/2.0 protocol the library supports,
|
||||||
and returns 1. The following step is not taken.</li>
|
it is selected and returns 1. The following step is not taken.</li>
|
||||||
<li>If server’s list contains <tt class="docutils literal"><span class="pre">http/1.1</span></tt>, this function selects
|
<li>If peer’s list contains <tt class="docutils literal"><span class="pre">http/1.1</span></tt>, this function selects
|
||||||
<tt class="docutils literal"><span class="pre">http/1.1</span></tt> and returns 0. The following step is not taken.</li>
|
<tt class="docutils literal"><span class="pre">http/1.1</span></tt> and returns 0. The following step is not taken.</li>
|
||||||
<li>This function selects nothing and returns -1. (So called
|
<li>This function selects nothing and returns -1. (So called
|
||||||
non-overlap case). In this case, <em>out</em> and <em>outlen</em> are left
|
non-overlap case). In this case, <em>out</em> and <em>outlen</em> are left
|
||||||
|
@ -2459,7 +2460,7 @@ written into <em>*out</em> and its length (which is 17) is
|
||||||
assigned to <em>*outlen</em>.</p>
|
assigned to <em>*outlen</em>.</p>
|
||||||
<p>See <a class="reference external" href="http://technotes.googlecode.com/git/nextprotoneg.html">http://technotes.googlecode.com/git/nextprotoneg.html</a> for more
|
<p>See <a class="reference external" href="http://technotes.googlecode.com/git/nextprotoneg.html">http://technotes.googlecode.com/git/nextprotoneg.html</a> for more
|
||||||
details about NPN.</p>
|
details about NPN.</p>
|
||||||
<p>To use this method you should do something like:</p>
|
<p>For NPN, to use this method you should do something like:</p>
|
||||||
<div class="highlight-c"><div class="highlight"><pre><span class="k">static</span> <span class="kt">int</span> <span class="nf">select_next_proto_cb</span><span class="p">(</span><span class="n">SSL</span><span class="o">*</span> <span class="n">ssl</span><span class="p">,</span>
|
<div class="highlight-c"><div class="highlight"><pre><span class="k">static</span> <span class="kt">int</span> <span class="nf">select_next_proto_cb</span><span class="p">(</span><span class="n">SSL</span><span class="o">*</span> <span class="n">ssl</span><span class="p">,</span>
|
||||||
<span class="kt">unsigned</span> <span class="kt">char</span> <span class="o">**</span><span class="n">out</span><span class="p">,</span>
|
<span class="kt">unsigned</span> <span class="kt">char</span> <span class="o">**</span><span class="n">out</span><span class="p">,</span>
|
||||||
<span class="kt">unsigned</span> <span class="kt">char</span> <span class="o">*</span><span class="n">outlen</span><span class="p">,</span>
|
<span class="kt">unsigned</span> <span class="kt">char</span> <span class="o">*</span><span class="n">outlen</span><span class="p">,</span>
|
||||||
|
@ -2478,9 +2479,6 @@ details about NPN.</p>
|
||||||
<span class="n">SSL_CTX_set_next_proto_select_cb</span><span class="p">(</span><span class="n">ssl_ctx</span><span class="p">,</span> <span class="n">select_next_proto_cb</span><span class="p">,</span> <span class="n">my_obj</span><span class="p">);</span>
|
<span class="n">SSL_CTX_set_next_proto_select_cb</span><span class="p">(</span><span class="n">ssl_ctx</span><span class="p">,</span> <span class="n">select_next_proto_cb</span><span class="p">,</span> <span class="n">my_obj</span><span class="p">);</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>Note that the HTTP/2.0 spec does use ALPN instead of NPN. This
|
|
||||||
function is provided for transitional period before ALPN is got
|
|
||||||
implemented in major SSL/TLS libraries.</p>
|
|
||||||
</dd></dl>
|
</dd></dl>
|
||||||
|
|
||||||
<dl class="function">
|
<dl class="function">
|
||||||
|
|
|
@ -2328,10 +2328,11 @@
|
||||||
<span class="cm">/**</span>
|
<span class="cm">/**</span>
|
||||||
<span class="cm"> * @function</span>
|
<span class="cm"> * @function</span>
|
||||||
<span class="cm"> *</span>
|
<span class="cm"> *</span>
|
||||||
<span class="cm"> * A helper function for dealing with NPN in client side. The |in|</span>
|
<span class="cm"> * A helper function for dealing with NPN in client side or ALPN in</span>
|
||||||
<span class="cm"> * contains server's protocol in preferable order. The format of |in|</span>
|
<span class="cm"> * server side. The |in| contains peer's protocol list in preferable</span>
|
||||||
<span class="cm"> * is length-prefixed and not null-terminated. For example,</span>
|
<span class="cm"> * order. The format of |in| is length-prefixed and not</span>
|
||||||
<span class="cm"> * ``HTTP-draft-04/2.0`` and ``http/1.1`` stored in |in| like this::</span>
|
<span class="cm"> * null-terminated. For example, ``HTTP-draft-04/2.0`` and</span>
|
||||||
|
<span class="cm"> * ``http/1.1`` stored in |in| like this::</span>
|
||||||
<span class="cm"> *</span>
|
<span class="cm"> *</span>
|
||||||
<span class="cm"> * in[0] = 17</span>
|
<span class="cm"> * in[0] = 17</span>
|
||||||
<span class="cm"> * in[1..17] = "HTTP-draft-04/2.0"</span>
|
<span class="cm"> * in[1..17] = "HTTP-draft-04/2.0"</span>
|
||||||
|
@ -2341,10 +2342,10 @@
|
||||||
<span class="cm"> *</span>
|
<span class="cm"> *</span>
|
||||||
<span class="cm"> * The selection algorithm is as follows:</span>
|
<span class="cm"> * The selection algorithm is as follows:</span>
|
||||||
<span class="cm"> *</span>
|
<span class="cm"> *</span>
|
||||||
<span class="cm"> * 1. If server's list contains ``HTTP-draft-04/2.0``, it is selected</span>
|
<span class="cm"> * 1. If peer's list contains HTTP/2.0 protocol the library supports,</span>
|
||||||
<span class="cm"> * and returns 1. The following step is not taken.</span>
|
<span class="cm"> * it is selected and returns 1. The following step is not taken.</span>
|
||||||
<span class="cm"> *</span>
|
<span class="cm"> *</span>
|
||||||
<span class="cm"> * 2. If server's list contains ``http/1.1``, this function selects</span>
|
<span class="cm"> * 2. If peer's list contains ``http/1.1``, this function selects</span>
|
||||||
<span class="cm"> * ``http/1.1`` and returns 0. The following step is not taken.</span>
|
<span class="cm"> * ``http/1.1`` and returns 0. The following step is not taken.</span>
|
||||||
<span class="cm"> *</span>
|
<span class="cm"> *</span>
|
||||||
<span class="cm"> * 3. This function selects nothing and returns -1. (So called</span>
|
<span class="cm"> * 3. This function selects nothing and returns -1. (So called</span>
|
||||||
|
@ -2358,7 +2359,7 @@
|
||||||
<span class="cm"> * See http://technotes.googlecode.com/git/nextprotoneg.html for more</span>
|
<span class="cm"> * See http://technotes.googlecode.com/git/nextprotoneg.html for more</span>
|
||||||
<span class="cm"> * details about NPN.</span>
|
<span class="cm"> * details about NPN.</span>
|
||||||
<span class="cm"> *</span>
|
<span class="cm"> *</span>
|
||||||
<span class="cm"> * To use this method you should do something like::</span>
|
<span class="cm"> * For NPN, to use this method you should do something like::</span>
|
||||||
<span class="cm"> *</span>
|
<span class="cm"> *</span>
|
||||||
<span class="cm"> * static int select_next_proto_cb(SSL* ssl,</span>
|
<span class="cm"> * static int select_next_proto_cb(SSL* ssl,</span>
|
||||||
<span class="cm"> * unsigned char **out,</span>
|
<span class="cm"> * unsigned char **out,</span>
|
||||||
|
@ -2377,10 +2378,6 @@
|
||||||
<span class="cm"> * ...</span>
|
<span class="cm"> * ...</span>
|
||||||
<span class="cm"> * SSL_CTX_set_next_proto_select_cb(ssl_ctx, select_next_proto_cb, my_obj);</span>
|
<span class="cm"> * SSL_CTX_set_next_proto_select_cb(ssl_ctx, select_next_proto_cb, my_obj);</span>
|
||||||
<span class="cm"> *</span>
|
<span class="cm"> *</span>
|
||||||
<span class="cm"> * Note that the HTTP/2.0 spec does use ALPN instead of NPN. This</span>
|
|
||||||
<span class="cm"> * function is provided for transitional period before ALPN is got</span>
|
|
||||||
<span class="cm"> * implemented in major SSL/TLS libraries.</span>
|
|
||||||
<span class="cm"> *</span>
|
|
||||||
<span class="cm"> */</span>
|
<span class="cm"> */</span>
|
||||||
<span class="kt">int</span> <span class="nf">nghttp2_select_next_protocol</span><span class="p">(</span><span class="kt">unsigned</span> <span class="kt">char</span> <span class="o">**</span><span class="n">out</span><span class="p">,</span> <span class="kt">unsigned</span> <span class="kt">char</span> <span class="o">*</span><span class="n">outlen</span><span class="p">,</span>
|
<span class="kt">int</span> <span class="nf">nghttp2_select_next_protocol</span><span class="p">(</span><span class="kt">unsigned</span> <span class="kt">char</span> <span class="o">**</span><span class="n">out</span><span class="p">,</span> <span class="kt">unsigned</span> <span class="kt">char</span> <span class="o">*</span><span class="n">outlen</span><span class="p">,</span>
|
||||||
<span class="k">const</span> <span class="kt">unsigned</span> <span class="kt">char</span> <span class="o">*</span><span class="n">in</span><span class="p">,</span> <span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">inlen</span><span class="p">);</span>
|
<span class="k">const</span> <span class="kt">unsigned</span> <span class="kt">char</span> <span class="o">*</span><span class="n">in</span><span class="p">,</span> <span class="kt">unsigned</span> <span class="kt">int</span> <span class="n">inlen</span><span class="p">);</span>
|
||||||
|
|
BIN
objects.inv
BIN
objects.inv
Binary file not shown.
|
@ -177,7 +177,7 @@ header compression
|
||||||
<td> </td>
|
<td> </td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="row-odd"><td>ALPN</td>
|
<tr class="row-odd"><td>ALPN</td>
|
||||||
<td> </td>
|
<td>Done</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
@ -284,7 +284,7 @@ $ make</pre>
|
||||||
<div class="section" id="nghttp-client">
|
<div class="section" id="nghttp-client">
|
||||||
<h3>nghttp - client<a class="headerlink" href="#nghttp-client" title="Permalink to this headline">¶</a></h3>
|
<h3>nghttp - client<a class="headerlink" href="#nghttp-client" title="Permalink to this headline">¶</a></h3>
|
||||||
<p><tt class="docutils literal"><span class="pre">nghttp</span></tt> is a HTTP/2.0 client. It can connect to the HTTP/2.0 server
|
<p><tt class="docutils literal"><span class="pre">nghttp</span></tt> is a HTTP/2.0 client. It can connect to the HTTP/2.0 server
|
||||||
with prior knowledge, HTTP Upgrade and NPN TLS extension.</p>
|
with prior knowledge, HTTP Upgrade and NPN/ALPN TLS extension.</p>
|
||||||
<p>It has verbose output mode for framing information. Here is sample
|
<p>It has verbose output mode for framing information. Here is sample
|
||||||
output from <tt class="docutils literal"><span class="pre">nghttp</span></tt> client:</p>
|
output from <tt class="docutils literal"><span class="pre">nghttp</span></tt> client:</p>
|
||||||
<div class="highlight-c"><pre>$ src/nghttp -vn https://localhost:8443
|
<div class="highlight-c"><pre>$ src/nghttp -vn https://localhost:8443
|
||||||
|
@ -401,7 +401,7 @@ Upgrade: HTTP-draft-09/2.0
|
||||||
multiplexes connections using non-blocking socket.</p>
|
multiplexes connections using non-blocking socket.</p>
|
||||||
<p>By default, it uses SSL/TLS connection. Use <tt class="docutils literal"><span class="pre">--no-tls</span></tt> option to
|
<p>By default, it uses SSL/TLS connection. Use <tt class="docutils literal"><span class="pre">--no-tls</span></tt> option to
|
||||||
disable it.</p>
|
disable it.</p>
|
||||||
<p><tt class="docutils literal"><span class="pre">nghttpd</span></tt> only accept the HTTP/2.0 connection via NPN or direct
|
<p><tt class="docutils literal"><span class="pre">nghttpd</span></tt> only accept the HTTP/2.0 connection via NPN/ALPN or direct
|
||||||
HTTP/2.0 connection. No HTTP Upgrade is supported.</p>
|
HTTP/2.0 connection. No HTTP Upgrade is supported.</p>
|
||||||
<p><tt class="docutils literal"><span class="pre">-p</span></tt> option allows users to configure server push.</p>
|
<p><tt class="docutils literal"><span class="pre">-p</span></tt> option allows users to configure server push.</p>
|
||||||
<p>Just like <tt class="docutils literal"><span class="pre">nghttp</span></tt>, it has verbose output mode for framing
|
<p>Just like <tt class="docutils literal"><span class="pre">nghttp</span></tt>, it has verbose output mode for framing
|
||||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue