Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
2966ad2d
Commit
2966ad2d
authored
Feb 19, 2014
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update doc
parent
649586ff
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
15 deletions
+15
-15
lib/nghttp2_stream.h
lib/nghttp2_stream.h
+10
-10
tests/nghttp2_session_test.c
tests/nghttp2_session_test.c
+5
-5
No files found.
lib/nghttp2_stream.h
View file @
2966ad2d
...
@@ -35,24 +35,24 @@
...
@@ -35,24 +35,24 @@
/*
/*
* If local peer is stream initiator:
* If local peer is stream initiator:
* NGHTTP2_STREAM_OPENING : upon sending
SYN_STREAM
* NGHTTP2_STREAM_OPENING : upon sending
request HEADERS
* NGHTTP2_STREAM_OPENED : upon receiving
SYN_REPLY
* NGHTTP2_STREAM_OPENED : upon receiving
response HEADERS
* NGHTTP2_STREAM_CLOSING : upon queuing RST_STREAM
* NGHTTP2_STREAM_CLOSING : upon queuing RST_STREAM
*
*
* If remote peer is stream initiator:
* If remote peer is stream initiator:
* NGHTTP2_STREAM_OPENING : upon receiving
SYN_STREAM
* NGHTTP2_STREAM_OPENING : upon receiving
request HEADERS
* NGHTTP2_STREAM_OPENED : upon sending
SYN_REPLY
* NGHTTP2_STREAM_OPENED : upon sending
response HEADERS
* NGHTTP2_STREAM_CLOSING : upon queuing RST_STREAM
* NGHTTP2_STREAM_CLOSING : upon queuing RST_STREAM
*/
*/
typedef
enum
{
typedef
enum
{
/* Initial state */
/* Initial state */
NGHTTP2_STREAM_INITIAL
,
NGHTTP2_STREAM_INITIAL
,
/* For stream initiator:
SYN_STREAM has been sent, but SYN_REPLY is
/* For stream initiator:
request HEADERS has been sent, but response
not received yet. For receiver: SYN_STREAM has been received,
HEADERS has not been received yet. For receiver: request HEADERS
but it does not send SYN_REPLY
yet. */
has been received, but it does not send response HEADERS
yet. */
NGHTTP2_STREAM_OPENING
,
NGHTTP2_STREAM_OPENING
,
/* For stream initiator:
SYN_REPLY
is received. For receiver:
/* For stream initiator:
response HEADERS
is received. For receiver:
SYN_REPLY
is sent. */
response HEADERS
is sent. */
NGHTTP2_STREAM_OPENED
,
NGHTTP2_STREAM_OPENED
,
/* RST_STREAM is received, but somehow we need to keep stream in
/* RST_STREAM is received, but somehow we need to keep stream in
memory. */
memory. */
...
@@ -93,7 +93,7 @@ typedef struct {
...
@@ -93,7 +93,7 @@ typedef struct {
nghttp2_outbound_item
*
deferred_data
;
nghttp2_outbound_item
*
deferred_data
;
/* stream ID */
/* stream ID */
int32_t
stream_id
;
int32_t
stream_id
;
/* Use same value in
SYN_STREAM
frame */
/* Use same value in
request HEADERS
frame */
int32_t
pri
;
int32_t
pri
;
/* Current remote window size. This value is computed against the
/* Current remote window size. This value is computed against the
current initial window size of remote endpoint. */
current initial window size of remote endpoint. */
...
...
tests/nghttp2_session_test.c
View file @
2966ad2d
...
@@ -3228,7 +3228,7 @@ void test_nghttp2_session_max_concurrent_streams(void)
...
@@ -3228,7 +3228,7 @@ void test_nghttp2_session_max_concurrent_streams(void)
/*
/*
* Check that on_stream_close_callback is called when server pushed
* 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
)
void
test_nghttp2_session_stream_close_on_headers_push
(
void
)
{
{
...
@@ -3280,7 +3280,7 @@ void test_nghttp2_session_stop_data_with_rst_stream(void)
...
@@ -3280,7 +3280,7 @@ void test_nghttp2_session_stop_data_with_rst_stream(void)
nghttp2_submit_response
(
session
,
1
,
NULL
,
0
,
&
data_prd
);
nghttp2_submit_response
(
session
,
1
,
NULL
,
0
,
&
data_prd
);
ud
.
block_count
=
2
;
ud
.
block_count
=
2
;
/* Sends
SYN_REPLY
+ DATA[0] */
/* Sends
response HEADERS
+ DATA[0] */
CU_ASSERT
(
0
==
nghttp2_session_send
(
session
));
CU_ASSERT
(
0
==
nghttp2_session_send
(
session
));
CU_ASSERT
(
NGHTTP2_DATA
==
ud
.
sent_frame_type
);
CU_ASSERT
(
NGHTTP2_DATA
==
ud
.
sent_frame_type
);
/* data for DATA[1] is read from data_prd but it is not sent */
/* 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)
...
@@ -3688,7 +3688,7 @@ void test_nghttp2_session_on_ctrl_not_send(void)
NGHTTP2_PRI_DEFAULT
,
NGHTTP2_PRI_DEFAULT
,
NGHTTP2_STREAM_OPENING
,
&
user_data
);
NGHTTP2_STREAM_OPENING
,
&
user_data
);
/* Check
SYN_REPLY
*/
/* Check
response HEADERS
*/
/* Send bogus stream ID */
/* Send bogus stream ID */
CU_ASSERT
(
0
==
CU_ASSERT
(
0
==
nghttp2_submit_headers
(
session
,
NGHTTP2_FLAG_END_STREAM
,
3
,
nghttp2_submit_headers
(
session
,
NGHTTP2_FLAG_END_STREAM
,
3
,
...
@@ -3741,7 +3741,7 @@ void test_nghttp2_session_on_ctrl_not_send(void)
...
@@ -3741,7 +3741,7 @@ void test_nghttp2_session_on_ctrl_not_send(void)
nghttp2_session_del
(
session
);
nghttp2_session_del
(
session
);
/* Check
SYN_STREAM
*/
/* Check
request HEADERS
*/
user_data
.
frame_not_send_cb_called
=
0
;
user_data
.
frame_not_send_cb_called
=
0
;
CU_ASSERT
(
nghttp2_session_client_new
(
&
session
,
&
callbacks
,
&
user_data
)
==
0
);
CU_ASSERT
(
nghttp2_session_client_new
(
&
session
,
&
callbacks
,
&
user_data
)
==
0
);
/* Maximum Stream ID is reached */
/* Maximum Stream ID is reached */
...
@@ -3919,7 +3919,7 @@ void test_nghttp2_session_data_backoff_by_high_pri_frame(void)
...
@@ -3919,7 +3919,7 @@ void test_nghttp2_session_data_backoff_by_high_pri_frame(void)
&
data_prd
,
NULL
);
&
data_prd
,
NULL
);
ud
.
block_count
=
2
;
ud
.
block_count
=
2
;
/* Sends
SYN_STREAM
+ DATA[0] */
/* Sends
request HEADERS
+ DATA[0] */
CU_ASSERT
(
0
==
nghttp2_session_send
(
session
));
CU_ASSERT
(
0
==
nghttp2_session_send
(
session
));
CU_ASSERT
(
NGHTTP2_DATA
==
ud
.
sent_frame_type
);
CU_ASSERT
(
NGHTTP2_DATA
==
ud
.
sent_frame_type
);
/* data for DATA[1] is read from data_prd but it is not sent */
/* data for DATA[1] is read from data_prd but it is not sent */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment