Commit f52105ea authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Update doc

parent bcc47178
...@@ -687,13 +687,18 @@ Types (structs, unions and typedefs) ...@@ -687,13 +687,18 @@ Types (structs, unions and typedefs)
:macro:`NGHTTP2_ERR_EOF`. For other errors, it must return :macro:`NGHTTP2_ERR_EOF`. For other errors, it must return
:macro:`NGHTTP2_ERR_CALLBACK_FAILURE`. :macro:`NGHTTP2_ERR_CALLBACK_FAILURE`.
.. type:: typedef void (*nghttp2_on_frame_recv_callback) (nghttp2_session *session, nghttp2_frame *frame, void *user_data) .. type:: typedef int (*nghttp2_on_frame_recv_callback) (nghttp2_session *session, nghttp2_frame *frame, void *user_data)
Callback function invoked by `nghttp2_session_recv()` when a Callback function invoked by `nghttp2_session_recv()` when a
non-DATA frame is received. non-DATA frame is received.
.. type:: typedef void (*nghttp2_on_invalid_frame_recv_callback) (nghttp2_session *session, nghttp2_frame *frame, nghttp2_error_code error_code, void *user_data) The implementation of this function must return 0 if it
succeeds. If nonzero is returned, it is treated as fatal error and
`nghttp2_session_recv()` and `nghttp2_session_send()` functions
immediately return :macro:`NGHTTP2_ERR_CALLBACK_FAILURE`.
.. type:: typedef int (*nghttp2_on_invalid_frame_recv_callback) (nghttp2_session *session, nghttp2_frame *frame, nghttp2_error_code error_code, void *user_data)
Callback function invoked by `nghttp2_session_recv()` when an Callback function invoked by `nghttp2_session_recv()` when an
...@@ -702,7 +707,12 @@ Types (structs, unions and typedefs) ...@@ -702,7 +707,12 @@ Types (structs, unions and typedefs)
callback function is invoked, the library automatically submits callback function is invoked, the library automatically submits
either RST_STREAM or GOAWAY frame. either RST_STREAM or GOAWAY frame.
.. type:: typedef void (*nghttp2_on_data_chunk_recv_callback) (nghttp2_session *session, uint8_t flags, int32_t stream_id, const uint8_t *data, size_t len, void *user_data) The implementation of this function must return 0 if it
succeeds. If nonzero is returned, it is treated as fatal error and
`nghttp2_session_recv()` and `nghttp2_session_send()` functions
immediately return :macro:`NGHTTP2_ERR_CALLBACK_FAILURE`.
.. type:: typedef int (*nghttp2_on_data_chunk_recv_callback) (nghttp2_session *session, uint8_t flags, int32_t stream_id, const uint8_t *data, size_t len, void *user_data)
Callback function invoked when a chunk of data in DATA frame is Callback function invoked when a chunk of data in DATA frame is
...@@ -713,14 +723,24 @@ Types (structs, unions and typedefs) ...@@ -713,14 +723,24 @@ Types (structs, unions and typedefs)
stream. You should use :type:`nghttp2_on_data_recv_callback` to stream. You should use :type:`nghttp2_on_data_recv_callback` to
know all data frames are received. know all data frames are received.
.. type:: typedef void (*nghttp2_on_data_recv_callback) (nghttp2_session *session, uint16_t length, uint8_t flags, int32_t stream_id, void *user_data) The implementation of this function must return 0 if it
succeeds. If nonzero is returned, it is treated as fatal error and
`nghttp2_session_recv()` and `nghttp2_session_send()` functions
immediately return :macro:`NGHTTP2_ERR_CALLBACK_FAILURE`.
.. type:: typedef int (*nghttp2_on_data_recv_callback) (nghttp2_session *session, uint16_t length, uint8_t flags, int32_t stream_id, void *user_data)
Callback function invoked when DATA frame is received. The actual Callback function invoked when DATA frame is received. The actual
data it contains are received by data it contains are received by
:type:`nghttp2_on_data_chunk_recv_callback`. :type:`nghttp2_on_data_chunk_recv_callback`.
.. type:: typedef void (*nghttp2_before_frame_send_callback) (nghttp2_session *session, nghttp2_frame *frame, void *user_data) The implementation of this function must return 0 if it
succeeds. If nonzero is returned, it is treated as fatal error and
`nghttp2_session_recv()` and `nghttp2_session_send()` functions
immediately return :macro:`NGHTTP2_ERR_CALLBACK_FAILURE`.
.. type:: typedef int (*nghttp2_before_frame_send_callback) (nghttp2_session *session, nghttp2_frame *frame, void *user_data)
Callback function invoked before the non-DATA frame *frame* is Callback function invoked before the non-DATA frame *frame* is
...@@ -729,12 +749,22 @@ Types (structs, unions and typedefs) ...@@ -729,12 +749,22 @@ Types (structs, unions and typedefs)
`nghttp2_session_get_stream_user_data()`), which is not assigned `nghttp2_session_get_stream_user_data()`), which is not assigned
when it was queued. when it was queued.
.. type:: typedef void (*nghttp2_on_frame_send_callback) (nghttp2_session *session, nghttp2_frame *frame, void *user_data) The implementation of this function must return 0 if it
succeeds. If nonzero is returned, it is treated as fatal error and
`nghttp2_session_recv()` and `nghttp2_session_send()` functions
immediately return :macro:`NGHTTP2_ERR_CALLBACK_FAILURE`.
.. type:: typedef int (*nghttp2_on_frame_send_callback) (nghttp2_session *session, nghttp2_frame *frame, void *user_data)
Callback function invoked after the non-DATA frame *frame* is sent. Callback function invoked after the non-DATA frame *frame* is sent.
.. type:: typedef void (*nghttp2_on_frame_not_send_callback) (nghttp2_session *session, nghttp2_frame *frame, int lib_error_code, void *user_data) The implementation of this function must return 0 if it
succeeds. If nonzero is returned, it is treated as fatal error and
`nghttp2_session_recv()` and `nghttp2_session_send()` functions
immediately return :macro:`NGHTTP2_ERR_CALLBACK_FAILURE`.
.. type:: typedef int (*nghttp2_on_frame_not_send_callback) (nghttp2_session *session, nghttp2_frame *frame, int lib_error_code, void *user_data)
Callback function invoked after the non-DATA frame *frame* is not Callback function invoked after the non-DATA frame *frame* is not
...@@ -742,12 +772,22 @@ Types (structs, unions and typedefs) ...@@ -742,12 +772,22 @@ Types (structs, unions and typedefs)
*lib_error_code*, which is one of the values defined in *lib_error_code*, which is one of the values defined in
:type:`nghttp2_error`. :type:`nghttp2_error`.
.. type:: typedef void (*nghttp2_on_data_send_callback) (nghttp2_session *session, uint16_t length, uint8_t flags, int32_t stream_id, void *user_data) The implementation of this function must return 0 if it
succeeds. If nonzero is returned, it is treated as fatal error and
`nghttp2_session_recv()` and `nghttp2_session_send()` functions
immediately return :macro:`NGHTTP2_ERR_CALLBACK_FAILURE`.
.. type:: typedef int (*nghttp2_on_data_send_callback) (nghttp2_session *session, uint16_t length, uint8_t flags, int32_t stream_id, void *user_data)
Callback function invoked after DATA frame is sent. Callback function invoked after DATA frame is sent.
.. type:: typedef void (*nghttp2_on_stream_close_callback) (nghttp2_session *session, int32_t stream_id, nghttp2_error_code error_code, void *user_data) The implementation of this function must return 0 if it
succeeds. If nonzero is returned, it is treated as fatal error and
`nghttp2_session_recv()` and `nghttp2_session_send()` functions
immediately return :macro:`NGHTTP2_ERR_CALLBACK_FAILURE`.
.. type:: typedef int (*nghttp2_on_stream_close_callback) (nghttp2_session *session, int32_t stream_id, nghttp2_error_code error_code, void *user_data)
Callback function invoked when the stream *stream_id* is Callback function invoked when the stream *stream_id* is
...@@ -756,7 +796,12 @@ Types (structs, unions and typedefs) ...@@ -756,7 +796,12 @@ Types (structs, unions and typedefs)
`nghttp2_submit_request()` or `nghttp2_submit_headers()`, is `nghttp2_submit_request()` or `nghttp2_submit_headers()`, is
still available in this function. still available in this function.
.. type:: typedef void (*nghttp2_on_request_recv_callback) (nghttp2_session *session, int32_t stream_id, void *user_data) The implementation of this function must return 0 if it
succeeds. If nonzero is returned, it is treated as fatal error and
`nghttp2_session_recv()` and `nghttp2_session_send()` functions
immediately return :macro:`NGHTTP2_ERR_CALLBACK_FAILURE`.
.. type:: typedef int (*nghttp2_on_request_recv_callback) (nghttp2_session *session, int32_t stream_id, void *user_data)
Callback function invoked when the request from the remote peer is Callback function invoked when the request from the remote peer is
...@@ -764,7 +809,12 @@ Types (structs, unions and typedefs) ...@@ -764,7 +809,12 @@ Types (structs, unions and typedefs)
received. In HTTP, this means HTTP request, including request received. In HTTP, this means HTTP request, including request
body, is fully received. body, is fully received.
.. type:: typedef void (*nghttp2_on_frame_recv_parse_error_callback) (nghttp2_session *session, nghttp2_frame_type type, const uint8_t *head, size_t headlen, const uint8_t *payload, size_t payloadlen, int lib_error_code, void *user_data) The implementation of this function must return 0 if it
succeeds. If nonzero is returned, it is treated as fatal error and
`nghttp2_session_recv()` and `nghttp2_session_send()` functions
immediately return :macro:`NGHTTP2_ERR_CALLBACK_FAILURE`.
.. type:: typedef int (*nghttp2_on_frame_recv_parse_error_callback) (nghttp2_session *session, nghttp2_frame_type type, const uint8_t *head, size_t headlen, const uint8_t *payload, size_t payloadlen, int lib_error_code, void *user_data)
Callback function invoked when the received control frame octets Callback function invoked when the received control frame octets
...@@ -778,7 +828,12 @@ Types (structs, unions and typedefs) ...@@ -778,7 +828,12 @@ Types (structs, unions and typedefs)
after the length field. The *lib_error_code* is one of the error code after the length field. The *lib_error_code* is one of the error code
defined in :macro:`nghttp2_error` and indicates the error. defined in :macro:`nghttp2_error` and indicates the error.
.. type:: typedef void (*nghttp2_on_unknown_frame_recv_callback) (nghttp2_session *session, const uint8_t *head, size_t headlen, const uint8_t *payload, size_t payloadlen, void *user_data) The implementation of this function must return 0 if it
succeeds. If nonzero is returned, it is treated as fatal error and
`nghttp2_session_recv()` and `nghttp2_session_send()` functions
immediately return :macro:`NGHTTP2_ERR_CALLBACK_FAILURE`.
.. type:: typedef int (*nghttp2_on_unknown_frame_recv_callback) (nghttp2_session *session, const uint8_t *head, size_t headlen, const uint8_t *payload, size_t payloadlen, void *user_data)
Callback function invoked when the received frame type is Callback function invoked when the received frame type is
...@@ -789,6 +844,11 @@ Types (structs, unions and typedefs) ...@@ -789,6 +844,11 @@ Types (structs, unions and typedefs)
to the data portion of the received frame. The *payloadlen* is the to the data portion of the received frame. The *payloadlen* is the
length of the *payload*. This is the data after the length field. length of the *payload*. This is the data after the length field.
The implementation of this function must return 0 if it
succeeds. If nonzero is returned, it is treated as fatal error and
`nghttp2_session_recv()` and `nghttp2_session_send()` functions
immediately return :macro:`NGHTTP2_ERR_CALLBACK_FAILURE`.
.. type:: nghttp2_session_callbacks .. type:: nghttp2_session_callbacks
......
This diff is collapsed.
No preview for this file type
...@@ -107,10 +107,12 @@ header compression ...@@ -107,10 +107,12 @@ header compression
implementation. These endpoints supports <tt class="docutils literal"><span class="pre">HTTP-draft-06/2.0</span></tt> and implementation. These endpoints supports <tt class="docutils literal"><span class="pre">HTTP-draft-06/2.0</span></tt> and
the earlier draft versions are not supporeted.</p> the earlier draft versions are not supporeted.</p>
<ul> <ul>
<li><p class="first"><a class="reference external" href="https://106.186.112.116:8443">https://106.186.112.116:8443</a> TLS + NPN</p> <li><p class="first"><a class="reference external" href="https://106.186.112.116">https://106.186.112.116</a> (TLS + NPN)</p>
<p>NPN offers <tt class="docutils literal"><span class="pre">HTTP-draft-06/2.0</span></tt>, <tt class="docutils literal"><span class="pre">spdy/3</span></tt>, <tt class="docutils literal"><span class="pre">spdy/2</span></tt> and
<tt class="docutils literal"><span class="pre">http/1.1</span></tt>.</p>
<p>Note: certificate is self-signed and a browser will show alert</p> <p>Note: certificate is self-signed and a browser will show alert</p>
</li> </li>
<li><p class="first"><a class="reference external" href="http://106.186.112.116:8080">http://106.186.112.116:8080</a> direct, HTTP Upgrade</p> <li><p class="first"><a class="reference external" href="http://106.186.112.116">http://106.186.112.116</a> (Upgrade + Direct)</p>
</li> </li>
</ul> </ul>
</div> </div>
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment