From 2966ad2d1568bd51c61e86271f801655921b8f99 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 19 Feb 2014 00:16:25 +0900 Subject: [PATCH] Update doc --- lib/nghttp2_stream.h | 20 ++++++++++---------- tests/nghttp2_session_test.c | 10 +++++----- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/lib/nghttp2_stream.h b/lib/nghttp2_stream.h index a0392429..021bb800 100644 --- a/lib/nghttp2_stream.h +++ b/lib/nghttp2_stream.h @@ -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. */ diff --git a/tests/nghttp2_session_test.c b/tests/nghttp2_session_test.c index fdb2c524..5c682574 100644 --- a/tests/nghttp2_session_test.c +++ b/tests/nghttp2_session_test.c @@ -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 */