diff options
author | cbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-14 18:19:17 +0000 |
---|---|---|
committer | cbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-14 18:19:17 +0000 |
commit | 4c21b0f14edcb3bfc2c5c481428fe71bb9107817 (patch) | |
tree | e3db730ecdb981b0c66035c6d3efc7431008a778 /net/spdy/spdy_session.h | |
parent | 1655ba34a9191e59006bd7a48eb25b98319352e7 (diff) | |
download | chromium_src-4c21b0f14edcb3bfc2c5c481428fe71bb9107817.zip chromium_src-4c21b0f14edcb3bfc2c5c481428fe71bb9107817.tar.gz chromium_src-4c21b0f14edcb3bfc2c5c481428fe71bb9107817.tar.bz2 |
SPDY: Initial support for handling WINDOW_UPDATE frames and some cleanup.
BUG=48100
TEST=net_unittests --gtest_filter="SpdyProtocolTest.ControlFrameStructs:SpdyNetworkTransactionTest.WindowSizeChange:SpdyNetworkTransactionTest.WindowSizeOverflow"
Contributed by: agayev@google.com
Review URL: http://codereview.chromium.org/2807042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52352 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_session.h')
-rw-r--r-- | net/spdy/spdy_session.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/net/spdy/spdy_session.h b/net/spdy/spdy_session.h index e129d57..41ab927 100644 --- a/net/spdy/spdy_session.h +++ b/net/spdy/spdy_session.h @@ -36,6 +36,9 @@ class HttpNetworkSession; class BoundNetLog; class SSLInfo; +// default initial window size per SPDY protocol draft 2 +static const int kInitialWindowSize = 64 * 1024; + class SpdySession : public base::RefCounted<SpdySession>, public spdy::SpdyFramerVisitorInterface { public: @@ -94,6 +97,11 @@ class SpdySession : public base::RefCounted<SpdySession>, // Close a stream. void CloseStream(spdy::SpdyStreamId stream_id, int status); + // Reset a stream by sending a RST_STREAM frame with given status code. + // Also closes the stream. Was not piggybacked to CloseStream since not + // all of the calls to CloseStream necessitate sending a RST_STREAM. + void ResetStream(spdy::SpdyStreamId stream_id, spdy::SpdyStatusCodes status); + // Check if a stream is active. bool IsStreamActive(spdy::SpdyStreamId stream_id) const; @@ -151,6 +159,7 @@ class SpdySession : public base::RefCounted<SpdySession>, void OnFin(const spdy::SpdyRstStreamControlFrame& frame); void OnGoAway(const spdy::SpdyGoAwayControlFrame& frame); void OnSettings(const spdy::SpdySettingsControlFrame& frame); + void OnWindowUpdate(const spdy::SpdyWindowUpdateControlFrame& frame); // IO Callbacks void OnTCPConnect(int result); @@ -280,6 +289,11 @@ class SpdySession : public base::RefCounted<SpdySession>, bool in_session_pool_; // True if the session is currently in the pool. + int initial_window_size_; // Initial window size for the session; can be + // changed by an arriving SETTINGS frame; newly + // created streams use this value for the initial + // window size. + BoundNetLog net_log_; static bool use_ssl_; |