Update doc

This commit is contained in:
Tatsuhiro Tsujikawa 2014-02-19 00:16:25 +09:00
parent 649586fff6
commit 2966ad2d15
2 changed files with 15 additions and 15 deletions

View File

@ -35,24 +35,24 @@
/*
* If local peer is stream initiator:
* NGHTTP2_STREAM_OPENING : upon sending SYN_STREAM
* NGHTTP2_STREAM_OPENED : upon receiving SYN_REPLY
* NGHTTP2_STREAM_OPENING : upon sending request HEADERS
* NGHTTP2_STREAM_OPENED : upon receiving response HEADERS
* NGHTTP2_STREAM_CLOSING : upon queuing RST_STREAM
*
* If remote peer is stream initiator:
* NGHTTP2_STREAM_OPENING : upon receiving SYN_STREAM
* NGHTTP2_STREAM_OPENED : upon sending SYN_REPLY
* NGHTTP2_STREAM_OPENING : upon receiving request HEADERS
* NGHTTP2_STREAM_OPENED : upon sending response HEADERS
* NGHTTP2_STREAM_CLOSING : upon queuing RST_STREAM
*/
typedef enum {
/* Initial state */
NGHTTP2_STREAM_INITIAL,
/* For stream initiator: SYN_STREAM has been sent, but SYN_REPLY is
not received yet. For receiver: SYN_STREAM has been received,
but it does not send SYN_REPLY yet. */
/* For stream initiator: request HEADERS has been sent, but response
HEADERS has not been received yet. For receiver: request HEADERS
has been received, but it does not send response HEADERS yet. */
NGHTTP2_STREAM_OPENING,
/* For stream initiator: SYN_REPLY is received. For receiver:
SYN_REPLY is sent. */
/* For stream initiator: response HEADERS is received. For receiver:
response HEADERS is sent. */
NGHTTP2_STREAM_OPENED,
/* RST_STREAM is received, but somehow we need to keep stream in
memory. */
@ -93,7 +93,7 @@ typedef struct {
nghttp2_outbound_item *deferred_data;
/* stream ID */
int32_t stream_id;
/* Use same value in SYN_STREAM frame */
/* Use same value in request HEADERS frame */
int32_t pri;
/* Current remote window size. This value is computed against the
current initial window size of remote endpoint. */

View File

@ -3228,7 +3228,7 @@ void test_nghttp2_session_max_concurrent_streams(void)
/*
* Check that on_stream_close_callback is called when server pushed
* SYN_STREAM have NGHTTP2_CTRL_FLAG_FIN.
* HEADERS have NGHTTP2_FLAG_END_STREAM.
*/
void test_nghttp2_session_stream_close_on_headers_push(void)
{
@ -3280,7 +3280,7 @@ void test_nghttp2_session_stop_data_with_rst_stream(void)
nghttp2_submit_response(session, 1, NULL, 0, &data_prd);
ud.block_count = 2;
/* Sends SYN_REPLY + DATA[0] */
/* Sends response HEADERS + DATA[0] */
CU_ASSERT(0 == nghttp2_session_send(session));
CU_ASSERT(NGHTTP2_DATA == ud.sent_frame_type);
/* data for DATA[1] is read from data_prd but it is not sent */
@ -3688,7 +3688,7 @@ void test_nghttp2_session_on_ctrl_not_send(void)
NGHTTP2_PRI_DEFAULT,
NGHTTP2_STREAM_OPENING, &user_data);
/* Check SYN_REPLY */
/* Check response HEADERS */
/* Send bogus stream ID */
CU_ASSERT(0 ==
nghttp2_submit_headers(session, NGHTTP2_FLAG_END_STREAM, 3,
@ -3741,7 +3741,7 @@ void test_nghttp2_session_on_ctrl_not_send(void)
nghttp2_session_del(session);
/* Check SYN_STREAM */
/* Check request HEADERS */
user_data.frame_not_send_cb_called = 0;
CU_ASSERT(nghttp2_session_client_new(&session, &callbacks, &user_data) == 0);
/* Maximum Stream ID is reached */
@ -3919,7 +3919,7 @@ void test_nghttp2_session_data_backoff_by_high_pri_frame(void)
&data_prd, NULL);
ud.block_count = 2;
/* Sends SYN_STREAM + DATA[0] */
/* Sends request HEADERS + DATA[0] */
CU_ASSERT(0 == nghttp2_session_send(session));
CU_ASSERT(NGHTTP2_DATA == ud.sent_frame_type);
/* data for DATA[1] is read from data_prd but it is not sent */