Update doc

This commit is contained in:
Tatsuhiro Tsujikawa 2014-01-02 01:00:11 +09:00
parent 20877b1107
commit 74d82aac56
2 changed files with 12 additions and 15 deletions

View File

@ -24,7 +24,7 @@ SETTINGS_ENABLE_PUSH Done
FRAME_SIZE_ERROR Done
SETTINGS with ACK Done
Header Continuation
ALPN
ALPN Done
========================== =================
Public Test Server
@ -139,7 +139,7 @@ nghttp - client
+++++++++++++++
``nghttp`` is a HTTP/2.0 client. It can connect to the HTTP/2.0 server
with prior knowledge, HTTP Upgrade and NPN TLS extension.
with prior knowledge, HTTP Upgrade and NPN/ALPN TLS extension.
It has verbose output mode for framing information. Here is sample
output from ``nghttp`` client::
@ -261,7 +261,7 @@ multiplexes connections using non-blocking socket.
By default, it uses SSL/TLS connection. Use ``--no-tls`` option to
disable it.
``nghttpd`` only accept the HTTP/2.0 connection via NPN or direct
``nghttpd`` only accept the HTTP/2.0 connection via NPN/ALPN or direct
HTTP/2.0 connection. No HTTP Upgrade is supported.
``-p`` option allows users to configure server push.

View File

@ -2191,10 +2191,11 @@ int nghttp2_nv_compare_name(const nghttp2_nv *lhs, const nghttp2_nv *rhs);
/**
* @function
*
* A helper function for dealing with NPN in client side. The |in|
* contains server's protocol in preferable order. The format of |in|
* is length-prefixed and not null-terminated. For example,
* ``HTTP-draft-04/2.0`` and ``http/1.1`` stored in |in| like this::
* A helper function for dealing with NPN in client side or ALPN in
* server side. The |in| contains peer's protocol list in preferable
* order. The format of |in| is length-prefixed and not
* null-terminated. For example, ``HTTP-draft-04/2.0`` and
* ``http/1.1`` stored in |in| like this::
*
* in[0] = 17
* in[1..17] = "HTTP-draft-04/2.0"
@ -2204,10 +2205,10 @@ int nghttp2_nv_compare_name(const nghttp2_nv *lhs, const nghttp2_nv *rhs);
*
* The selection algorithm is as follows:
*
* 1. If server's list contains ``HTTP-draft-04/2.0``, it is selected
* and returns 1. The following step is not taken.
* 1. If peer's list contains HTTP/2.0 protocol the library supports,
* 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.
*
* 3. This function selects nothing and returns -1. (So called
@ -2221,7 +2222,7 @@ int nghttp2_nv_compare_name(const nghttp2_nv *lhs, const nghttp2_nv *rhs);
* See http://technotes.googlecode.com/git/nextprotoneg.html for more
* 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,
* unsigned char **out,
@ -2240,10 +2241,6 @@ int nghttp2_nv_compare_name(const nghttp2_nv *lhs, const nghttp2_nv *rhs);
* ...
* 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.
*
*/
int nghttp2_select_next_protocol(unsigned char **out, unsigned char *outlen,
const unsigned char *in, unsigned int inlen);