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
a3ff4cb5
Commit
a3ff4cb5
authored
Aug 09, 2013
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename window_size member of nghttp2_session as remote_window_size
parent
19377fb3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
10 deletions
+10
-10
lib/nghttp2_session.c
lib/nghttp2_session.c
+8
-8
lib/nghttp2_session.h
lib/nghttp2_session.h
+1
-1
tests/nghttp2_session_test.c
tests/nghttp2_session_test.c
+1
-1
No files found.
lib/nghttp2_session.c
View file @
a3ff4cb5
...
...
@@ -144,7 +144,7 @@ static int nghttp2_session_new(nghttp2_session **session_ptr,
(
*
session_ptr
)
->
remote_flow_control
=
1
;
(
*
session_ptr
)
->
local_flow_control
=
1
;
(
*
session_ptr
)
->
window_size
=
NGHTTP2_INITIAL_CONNECTION_WINDOW_SIZE
;
(
*
session_ptr
)
->
remote_
window_size
=
NGHTTP2_INITIAL_CONNECTION_WINDOW_SIZE
;
(
*
session_ptr
)
->
recv_window_size
=
0
;
(
*
session_ptr
)
->
local_window_size
=
NGHTTP2_INITIAL_CONNECTION_WINDOW_SIZE
;
...
...
@@ -819,7 +819,7 @@ static size_t nghttp2_session_next_data_read(nghttp2_session *session,
return
NGHTTP2_DATA_PAYLOAD_LENGTH
;
}
else
{
int32_t
session_window_size
=
session
->
remote_flow_control
?
session
->
window_size
:
INT32_MAX
;
session
->
remote_flow_control
?
session
->
remote_
window_size
:
INT32_MAX
;
int32_t
stream_window_size
=
stream
->
remote_flow_control
?
stream
->
remote_window_size
:
INT32_MAX
;
int32_t
window_size
=
nghttp2_min
(
session_window_size
,
...
...
@@ -1515,7 +1515,7 @@ int nghttp2_session_send(nghttp2_session *session)
stream
->
remote_window_size
-=
len
;
}
if
(
session
->
remote_flow_control
)
{
session
->
window_size
-=
len
;
session
->
remote_
window_size
-=
len
;
}
}
if
(
session
->
aob
.
framebufoff
==
session
->
aob
.
framebuflen
)
{
...
...
@@ -1879,7 +1879,7 @@ static int nghttp2_update_remote_initial_window_size_func
(
stream
->
deferred_flags
&
NGHTTP2_DEFERRED_FLOW_CONTROL
)
&&
stream
->
remote_window_size
>
0
&&
(
arg
->
session
->
remote_flow_control
==
0
||
arg
->
session
->
window_size
>
0
))
{
arg
->
session
->
remote_
window_size
>
0
))
{
rv
=
nghttp2_pq_push
(
&
arg
->
session
->
ob_pq
,
stream
->
deferred_data
);
if
(
rv
==
0
)
{
nghttp2_stream_detach_deferred_data
(
stream
);
...
...
@@ -2285,15 +2285,15 @@ int nghttp2_session_on_window_update_received(nghttp2_session *session,
return
0
;
}
if
(
NGHTTP2_MAX_WINDOW_SIZE
-
frame
->
window_update
.
window_size_increment
<
session
->
window_size
)
{
session
->
remote_
window_size
)
{
return
nghttp2_session_handle_invalid_connection
(
session
,
frame
,
NGHTTP2_FLOW_CONTROL_ERROR
);
}
session
->
window_size
+=
frame
->
window_update
.
window_size_increment
;
session
->
remote_
window_size
+=
frame
->
window_update
.
window_size_increment
;
nghttp2_session_call_on_frame_received
(
session
,
frame
);
/* To queue the DATA deferred by connection-level flow-control, we
have to check all streams. Bad. */
if
(
session
->
window_size
>
0
)
{
if
(
session
->
remote_
window_size
>
0
)
{
return
nghttp2_session_push_back_deferred_data
(
session
);
}
else
{
return
0
;
...
...
@@ -2336,7 +2336,7 @@ int nghttp2_session_on_window_update_received(nghttp2_session *session,
frame
->
window_update
.
window_size_increment
;
if
(
stream
->
remote_window_size
>
0
&&
(
session
->
remote_flow_control
==
0
||
session
->
window_size
>
0
)
&&
session
->
remote_
window_size
>
0
)
&&
stream
->
deferred_data
!=
NULL
&&
(
stream
->
deferred_flags
&
NGHTTP2_DEFERRED_FLOW_CONTROL
))
{
int
r
;
...
...
lib/nghttp2_session.h
View file @
a3ff4cb5
...
...
@@ -171,7 +171,7 @@ struct nghttp2_session {
uint8_t
local_flow_control
;
/* Current sender window size. This value is computed against the
current initial window size of remote endpoint. */
int32_t
window_size
;
int32_t
remote_
window_size
;
/* Keep track of the number of bytes received without
WINDOW_UPDATE. */
int32_t
recv_window_size
;
...
...
tests/nghttp2_session_test.c
View file @
a3ff4cb5
...
...
@@ -2597,7 +2597,7 @@ void test_nghttp2_session_flow_control(void)
/* Initial window size to 64KiB - 1*/
nghttp2_session_client_new
(
&
session
,
&
callbacks
,
&
ud
);
/* Change it to 64KiB for easy calculation */
session
->
window_size
=
64
*
1024
;
session
->
remote_
window_size
=
64
*
1024
;
session
->
remote_settings
[
NGHTTP2_SETTINGS_INITIAL_WINDOW_SIZE
]
=
64
*
1024
;
nghttp2_submit_request
(
session
,
NGHTTP2_PRI_DEFAULT
,
nv
,
&
data_prd
,
NULL
);
...
...
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