Update doc

This commit is contained in:
Tatsuhiro Tsujikawa 2014-01-18 00:35:41 +09:00
parent 0b14319675
commit 0f30fb98a9
1 changed files with 23 additions and 1 deletions

View File

@ -870,6 +870,11 @@ typedef ssize_t (*nghttp2_recv_callback)
* 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()`
@ -889,6 +894,14 @@ typedef int (*nghttp2_on_frame_recv_callback)
* 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
@ -1154,6 +1167,10 @@ typedef int (*nghttp2_on_header_callback)
* 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 :enum:`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()`
@ -1500,7 +1517,12 @@ int nghttp2_session_send(nghttp2_session *session);
* 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,