Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1707)

Unified Diff: net/spdy/spdy_session.h

Issue 1061853002: Emit session-level WINDOW_UPDATEs less frequently. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re: comments in #5. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/spdy/spdy_network_transaction_unittest.cc ('k') | net/spdy/spdy_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_session.h
diff --git a/net/spdy/spdy_session.h b/net/spdy/spdy_session.h
index 52ecad76211beefa065a5fca5fd34f0824ff3aaa..4d94e8fc4ed59976f2be280d89b6618a69cd60bf 100644
--- a/net/spdy/spdy_session.h
+++ b/net/spdy/spdy_session.h
@@ -58,9 +58,6 @@ const int kMaxConcurrentPushedStreams = 1000;
// yielding.
const int kMaxReadBytesWithoutYielding = 32 * 1024;
-// The initial receive window size for both streams and sessions.
-const int32 kDefaultInitialRecvWindowSize = 10 * 1024 * 1024; // 10MB
-
// First and last valid stream IDs. As we always act as the client,
// start at 1 for the first stream id.
const SpdyStreamId kFirstStreamId = 1;
@@ -245,7 +242,8 @@ class NET_EXPORT SpdySession : public BufferedSpdyFramerVisitorInterface,
bool enable_compression,
bool enable_ping_based_connection_checking,
NextProto default_protocol,
- size_t stream_initial_recv_window_size,
+ size_t session_max_recv_window_size,
+ size_t stream_max_recv_window_size,
size_t initial_max_concurrent_streams,
size_t max_concurrent_streams_limit,
TimeFunc time_func,
@@ -463,9 +461,9 @@ class NET_EXPORT SpdySession : public BufferedSpdyFramerVisitorInterface,
return stream_initial_send_window_size_;
}
- // Returns the current |stream_initial_recv_window_size_|.
- int32 stream_initial_recv_window_size() const {
- return stream_initial_recv_window_size_;
+ // Returns the current |stream_max_recv_window_size_|.
+ int32 stream_max_recv_window_size() const {
+ return stream_max_recv_window_size_;
}
// Returns true if no stream in the session can send data due to
@@ -1112,6 +1110,25 @@ class NET_EXPORT SpdySession : public BufferedSpdyFramerVisitorInterface,
// The (version-dependent) flow control state.
FlowControlState flow_control_state_;
+ // Current send window size. Zero unless session flow control is turned on.
+ int32 session_send_window_size_;
+
+ // Maximum receive window size. Each time a WINDOW_UPDATE is sent, it
+ // restores the receive window size to this value. Zero unless session flow
+ // control is turned on.
+ int32 session_max_recv_window_size_;
+
+ // Sum of |session_unacked_recv_window_bytes_| and current receive window
+ // size. Zero unless session flow control is turned on.
+ // TODO(bnc): Rename or change semantics so that |window_size_| is actual
+ // window size.
+ int32 session_recv_window_size_;
+
+ // When bytes are consumed, SpdyIOBuffer destructor calls back to SpdySession,
+ // and this member keeps count of them until the corresponding WINDOW_UPDATEs
+ // are sent. Zero unless session flow control is turned on.
+ int32 session_unacked_recv_window_bytes_;
+
// Initial send window size for this session's streams. Can be
// changed by an arriving SETTINGS frame. Newly created streams use
// this value for the initial send window size.
@@ -1122,13 +1139,7 @@ class NET_EXPORT SpdySession : public BufferedSpdyFramerVisitorInterface,
// frame with window size announcement to be sent on startup. Newly
// created streams will use this value for the initial receive
// window size.
- int32 stream_initial_recv_window_size_;
-
- // Session flow control variables. All zero unless session flow
- // control is turned on.
- int32 session_send_window_size_;
- int32 session_recv_window_size_;
- int32 session_unacked_recv_window_bytes_;
+ int32 stream_max_recv_window_size_;
// A queue of stream IDs that have been send-stalled at some point
// in the past.
« no previous file with comments | « net/spdy/spdy_network_transaction_unittest.cc ('k') | net/spdy/spdy_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698