Update doc

This commit is contained in:
Tatsuhiro Tsujikawa 2014-01-18 00:36:03 +09:00
parent 8ce9042a25
commit a3fa3bd62a
5 changed files with 66 additions and 4 deletions

View File

@ -800,6 +800,11 @@ Types (structs, unions and typedefs)
argument passed in to the call to `nghttp2_session_client_new()` or argument passed in to the call to `nghttp2_session_client_new()` or
`nghttp2_session_server_new()`. `nghttp2_session_server_new()`.
If frame is HEADERS or PUSH_PROMISE, the ``nva`` and ``nvlen``
member of their data structure are always ``NULL`` and 0
respectively. The header name/value pairs are emitted via
:type:`nghttp2_on_header_callback`.
The implementation of this function must return 0 if it The implementation of this function must return 0 if it
succeeds. If nonzero value is returned, it is treated as fatal succeeds. If nonzero value is returned, it is treated as fatal
error and `nghttp2_session_recv()` and `nghttp2_session_mem_recv()` error and `nghttp2_session_recv()` and `nghttp2_session_mem_recv()`
@ -816,6 +821,14 @@ Types (structs, unions and typedefs)
third argument passed in to the call to third argument passed in to the call to
`nghttp2_session_client_new()` or `nghttp2_session_server_new()`. `nghttp2_session_client_new()` or `nghttp2_session_server_new()`.
If frame is HEADERS or PUSH_PROMISE, the ``nva`` and ``nvlen``
member of their data structure are always ``NULL`` and 0
respectively.
If this callback is called, :type:`nghttp2_on_header_callback` and
:type:`nghttp2_on_end_headers_callback` will not be called for this
frame.
The implementation of this function must return 0 if it The implementation of this function must return 0 if it
succeeds. If nonzero is returned, it is treated as fatal error and succeeds. If nonzero is returned, it is treated as fatal error and
`nghttp2_session_recv()` and `nghttp2_session_send()` functions `nghttp2_session_recv()` and `nghttp2_session_send()` functions
@ -1029,6 +1042,10 @@ Types (structs, unions and typedefs)
will handle the error by either transmitting RST_STREAM or GOAWAY will handle the error by either transmitting RST_STREAM or GOAWAY
and terminate session. and terminate session.
If the *error_code* is not :macro:`NGHTTP2_NO_ERROR`, then
:type:`nghttp2_on_request_recv_callback` will not called for this
frame if the *frame* is HEADERS.
The implementation of this function must return 0 if it The implementation of this function must return 0 if it
succeeds. If nonzero value is returned, it is treated as fatal succeeds. If nonzero value is returned, it is treated as fatal
error and `nghttp2_session_recv()` and `nghttp2_session_mem_recv()` error and `nghttp2_session_recv()` and `nghttp2_session_mem_recv()`
@ -1294,7 +1311,12 @@ Functions
one or more times to receive whole frame. one or more times to receive whole frame.
2. If the received frame is valid, 2. If the received frame is valid,
:member:`nghttp2_session_callbacks.on_frame_recv_callback` is :member:`nghttp2_session_callbacks.on_frame_recv_callback` is
invoked. If the frame is the final frame of the request, invoked. If frame is either HEADERS or PUSH_PROMISE,
:member:`nghttp2_session_callbacks.on_header_callback` is
invoked for each header name/value pair. After all name/value
pairs are emitted (or decompression failed),
:member:`nghttp2_session_callbacks.on_end_headers_callback`
is invoked. If the frame is the final frame of the request,
:member:`nghttp2_session_callbacks.on_request_recv_callback` :member:`nghttp2_session_callbacks.on_request_recv_callback`
is invoked. If the reception of the frame triggers the is invoked. If the reception of the frame triggers the
closure of the stream, closure of the stream,

View File

@ -1307,6 +1307,10 @@ typedef int <tt class="descname">(*nghttp2_on_frame_recv_callback)</tt><big>(</b
non-DATA frame is received. The <em>user_data</em> pointer is the third non-DATA frame is received. The <em>user_data</em> pointer is the third
argument passed in to the call to <a class="reference internal" href="#nghttp2_session_client_new" title="nghttp2_session_client_new"><tt class="xref c c-func docutils literal"><span class="pre">nghttp2_session_client_new()</span></tt></a> or argument passed in to the call to <a class="reference internal" href="#nghttp2_session_client_new" title="nghttp2_session_client_new"><tt class="xref c c-func docutils literal"><span class="pre">nghttp2_session_client_new()</span></tt></a> or
<a class="reference internal" href="#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>.</p> <a class="reference internal" href="#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>.</p>
<p>If frame is HEADERS or PUSH_PROMISE, the <tt class="docutils literal"><span class="pre">nva</span></tt> and <tt class="docutils literal"><span class="pre">nvlen</span></tt>
member of their data structure are always <tt class="docutils literal"><span class="pre">NULL</span></tt> and 0
respectively. The header name/value pairs are emitted via
<a class="reference internal" href="#nghttp2_on_header_callback" title="nghttp2_on_header_callback"><tt class="xref c c-type docutils literal"><span class="pre">nghttp2_on_header_callback</span></tt></a>.</p>
<p>The implementation of this function must return 0 if it <p>The implementation of this function must return 0 if it
succeeds. If nonzero value is returned, it is treated as fatal succeeds. If nonzero value is returned, it is treated as fatal
error and <a class="reference internal" href="#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="#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> error and <a class="reference internal" href="#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="#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>
@ -1323,6 +1327,12 @@ callback function is invoked, the library automatically submits
either RST_STREAM or GOAWAY frame. The <em>user_data</em> pointer is the either RST_STREAM or GOAWAY frame. The <em>user_data</em> pointer is the
third argument passed in to the call to third argument passed in to the call to
<a class="reference internal" href="#nghttp2_session_client_new" title="nghttp2_session_client_new"><tt class="xref c c-func docutils literal"><span class="pre">nghttp2_session_client_new()</span></tt></a> or <a class="reference internal" href="#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>.</p> <a class="reference internal" href="#nghttp2_session_client_new" title="nghttp2_session_client_new"><tt class="xref c c-func docutils literal"><span class="pre">nghttp2_session_client_new()</span></tt></a> or <a class="reference internal" href="#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>.</p>
<p>If frame is HEADERS or PUSH_PROMISE, the <tt class="docutils literal"><span class="pre">nva</span></tt> and <tt class="docutils literal"><span class="pre">nvlen</span></tt>
member of their data structure are always <tt class="docutils literal"><span class="pre">NULL</span></tt> and 0
respectively.</p>
<p>If this callback is called, <a class="reference internal" href="#nghttp2_on_header_callback" title="nghttp2_on_header_callback"><tt class="xref c c-type docutils literal"><span class="pre">nghttp2_on_header_callback</span></tt></a> and
<a class="reference internal" href="#nghttp2_on_end_headers_callback" title="nghttp2_on_end_headers_callback"><tt class="xref c c-type docutils literal"><span class="pre">nghttp2_on_end_headers_callback</span></tt></a> will not be called for this
frame.</p>
<p>The implementation of this function must return 0 if it <p>The implementation of this function must return 0 if it
succeeds. If nonzero is returned, it is treated as fatal error and succeeds. If nonzero is returned, it is treated as fatal error and
<a class="reference internal" href="#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="#nghttp2_session_send" title="nghttp2_session_send"><tt class="xref c c-func docutils literal"><span class="pre">nghttp2_session_send()</span></tt></a> functions <a class="reference internal" href="#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="#nghttp2_session_send" title="nghttp2_session_send"><tt class="xref c c-func docutils literal"><span class="pre">nghttp2_session_send()</span></tt></a> functions
@ -1533,6 +1543,9 @@ header decompression succeeded. Otherwise, error prevented the
completion of the header decompression. In this case, the library completion of the header decompression. In this case, the library
will handle the error by either transmitting RST_STREAM or GOAWAY will handle the error by either transmitting RST_STREAM or GOAWAY
and terminate session.</p> and terminate session.</p>
<p>If the <em>error_code</em> is not <a class="reference internal" href="#NGHTTP2_NO_ERROR" title="NGHTTP2_NO_ERROR"><tt class="xref c c-macro docutils literal"><span class="pre">NGHTTP2_NO_ERROR</span></tt></a>, then
<a class="reference internal" href="#nghttp2_on_request_recv_callback" title="nghttp2_on_request_recv_callback"><tt class="xref c c-type docutils literal"><span class="pre">nghttp2_on_request_recv_callback</span></tt></a> will not called for this
frame if the <em>frame</em> is HEADERS.</p>
<p>The implementation of this function must return 0 if it <p>The implementation of this function must return 0 if it
succeeds. If nonzero value is returned, it is treated as fatal succeeds. If nonzero value is returned, it is treated as fatal
error and <a class="reference internal" href="#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="#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> error and <a class="reference internal" href="#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="#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>
@ -1853,7 +1866,12 @@ is invoked.</li>
one or more times to receive whole frame.</li> one or more times to receive whole frame.</li>
<li>If the received frame is valid, <li>If the received frame is valid,
<a class="reference internal" href="#nghttp2_session_callbacks.on_frame_recv_callback" title="nghttp2_session_callbacks.on_frame_recv_callback"><tt class="xref c c-member docutils literal"><span class="pre">nghttp2_session_callbacks.on_frame_recv_callback</span></tt></a> is <a class="reference internal" href="#nghttp2_session_callbacks.on_frame_recv_callback" title="nghttp2_session_callbacks.on_frame_recv_callback"><tt class="xref c c-member docutils literal"><span class="pre">nghttp2_session_callbacks.on_frame_recv_callback</span></tt></a> is
invoked. If the frame is the final frame of the request, invoked. If frame is either HEADERS or PUSH_PROMISE,
<a class="reference internal" href="#nghttp2_session_callbacks.on_header_callback" title="nghttp2_session_callbacks.on_header_callback"><tt class="xref c c-member docutils literal"><span class="pre">nghttp2_session_callbacks.on_header_callback</span></tt></a> is
invoked for each header name/value pair. After all name/value
pairs are emitted (or decompression failed),
<a class="reference internal" href="#nghttp2_session_callbacks.on_end_headers_callback" title="nghttp2_session_callbacks.on_end_headers_callback"><tt class="xref c c-member docutils literal"><span class="pre">nghttp2_session_callbacks.on_end_headers_callback</span></tt></a>
is invoked. If the frame is the final frame of the request,
<a class="reference internal" href="#nghttp2_session_callbacks.on_request_recv_callback" title="nghttp2_session_callbacks.on_request_recv_callback"><tt class="xref c c-member docutils literal"><span class="pre">nghttp2_session_callbacks.on_request_recv_callback</span></tt></a> <a class="reference internal" href="#nghttp2_session_callbacks.on_request_recv_callback" title="nghttp2_session_callbacks.on_request_recv_callback"><tt class="xref c c-member docutils literal"><span class="pre">nghttp2_session_callbacks.on_request_recv_callback</span></tt></a>
is invoked. If the reception of the frame triggers the is invoked. If the reception of the frame triggers the
closure of the stream, closure of the stream,

View File

@ -1008,6 +1008,11 @@
<span class="cm"> * argument passed in to the call to `nghttp2_session_client_new()` or</span> <span class="cm"> * argument passed in to the call to `nghttp2_session_client_new()` or</span>
<span class="cm"> * `nghttp2_session_server_new()`.</span> <span class="cm"> * `nghttp2_session_server_new()`.</span>
<span class="cm"> *</span> <span class="cm"> *</span>
<span class="cm"> * If frame is HEADERS or PUSH_PROMISE, the ``nva`` and ``nvlen``</span>
<span class="cm"> * member of their data structure are always ``NULL`` and 0</span>
<span class="cm"> * respectively. The header name/value pairs are emitted via</span>
<span class="cm"> * :type:`nghttp2_on_header_callback`.</span>
<span class="cm"> *</span>
<span class="cm"> * The implementation of this function must return 0 if it</span> <span class="cm"> * The implementation of this function must return 0 if it</span>
<span class="cm"> * succeeds. If nonzero value is returned, it is treated as fatal</span> <span class="cm"> * succeeds. If nonzero value is returned, it is treated as fatal</span>
<span class="cm"> * error and `nghttp2_session_recv()` and `nghttp2_session_mem_recv()`</span> <span class="cm"> * error and `nghttp2_session_recv()` and `nghttp2_session_mem_recv()`</span>
@ -1027,6 +1032,14 @@
<span class="cm"> * third argument passed in to the call to</span> <span class="cm"> * third argument passed in to the call to</span>
<span class="cm"> * `nghttp2_session_client_new()` or `nghttp2_session_server_new()`.</span> <span class="cm"> * `nghttp2_session_client_new()` or `nghttp2_session_server_new()`.</span>
<span class="cm"> *</span> <span class="cm"> *</span>
<span class="cm"> * If frame is HEADERS or PUSH_PROMISE, the ``nva`` and ``nvlen``</span>
<span class="cm"> * member of their data structure are always ``NULL`` and 0</span>
<span class="cm"> * respectively.</span>
<span class="cm"> *</span>
<span class="cm"> * If this callback is called, :type:`nghttp2_on_header_callback` and</span>
<span class="cm"> * :type:`nghttp2_on_end_headers_callback` will not be called for this</span>
<span class="cm"> * frame.</span>
<span class="cm"> *</span>
<span class="cm"> * The implementation of this function must return 0 if it</span> <span class="cm"> * The implementation of this function must return 0 if it</span>
<span class="cm"> * succeeds. If nonzero is returned, it is treated as fatal error and</span> <span class="cm"> * succeeds. If nonzero is returned, it is treated as fatal error and</span>
<span class="cm"> * `nghttp2_session_recv()` and `nghttp2_session_send()` functions</span> <span class="cm"> * `nghttp2_session_recv()` and `nghttp2_session_send()` functions</span>
@ -1292,6 +1305,10 @@
<span class="cm"> * will handle the error by either transmitting RST_STREAM or GOAWAY</span> <span class="cm"> * will handle the error by either transmitting RST_STREAM or GOAWAY</span>
<span class="cm"> * and terminate session.</span> <span class="cm"> * and terminate session.</span>
<span class="cm"> *</span> <span class="cm"> *</span>
<span class="cm"> * If the |error_code| is not :enum:`NGHTTP2_NO_ERROR`, then</span>
<span class="cm"> * :type:`nghttp2_on_request_recv_callback` will not called for this</span>
<span class="cm"> * frame if the |frame| is HEADERS.</span>
<span class="cm"> *</span>
<span class="cm"> * The implementation of this function must return 0 if it</span> <span class="cm"> * The implementation of this function must return 0 if it</span>
<span class="cm"> * succeeds. If nonzero value is returned, it is treated as fatal</span> <span class="cm"> * succeeds. If nonzero value is returned, it is treated as fatal</span>
<span class="cm"> * error and `nghttp2_session_recv()` and `nghttp2_session_mem_recv()`</span> <span class="cm"> * error and `nghttp2_session_recv()` and `nghttp2_session_mem_recv()`</span>
@ -1638,7 +1655,12 @@
<span class="cm"> * one or more times to receive whole frame.</span> <span class="cm"> * one or more times to receive whole frame.</span>
<span class="cm"> * 2. If the received frame is valid,</span> <span class="cm"> * 2. If the received frame is valid,</span>
<span class="cm"> * :member:`nghttp2_session_callbacks.on_frame_recv_callback` is</span> <span class="cm"> * :member:`nghttp2_session_callbacks.on_frame_recv_callback` is</span>
<span class="cm"> * invoked. If the frame is the final frame of the request,</span> <span class="cm"> * invoked. If frame is either HEADERS or PUSH_PROMISE,</span>
<span class="cm"> * :member:`nghttp2_session_callbacks.on_header_callback` is</span>
<span class="cm"> * invoked for each header name/value pair. After all name/value</span>
<span class="cm"> * pairs are emitted (or decompression failed),</span>
<span class="cm"> * :member:`nghttp2_session_callbacks.on_end_headers_callback`</span>
<span class="cm"> * is invoked. If the frame is the final frame of the request,</span>
<span class="cm"> * :member:`nghttp2_session_callbacks.on_request_recv_callback`</span> <span class="cm"> * :member:`nghttp2_session_callbacks.on_request_recv_callback`</span>
<span class="cm"> * is invoked. If the reception of the frame triggers the</span> <span class="cm"> * is invoked. If the reception of the frame triggers the</span>
<span class="cm"> * closure of the stream,</span> <span class="cm"> * closure of the stream,</span>

Binary file not shown.

File diff suppressed because one or more lines are too long