diff options
author | agayev@chromium.org <agayev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-20 14:16:27 +0000 |
---|---|---|
committer | agayev@chromium.org <agayev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-20 14:16:27 +0000 |
commit | 5af3c573076a8f04c285d6a0c40237462375e7c5 (patch) | |
tree | 3161f03d9e617a1499a83c2413faa435682c10a7 /net/spdy/spdy_protocol.h | |
parent | 1442b29a275b076203b5e0a78206fe3feda3b739 (diff) | |
download | chromium_src-5af3c573076a8f04c285d6a0c40237462375e7c5.zip chromium_src-5af3c573076a8f04c285d6a0c40237462375e7c5.tar.gz chromium_src-5af3c573076a8f04c285d6a0c40237462375e7c5.tar.bz2 |
Initial SPDY flow control support
BUG=48100
TEST=net_unittests --gtest_filter="SpdyProtocolTest.ControlFrameStructs:SpdyNetworkTransactionTest.WindowSizeChange:SpdyNetworkTransactionTest.WindowSizeOverflow"
Contributed by: agayev@google.com
Review URL: http://codereview.chromium.org/2805083
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53039 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_protocol.h')
-rw-r--r-- | net/spdy/spdy_protocol.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/net/spdy/spdy_protocol.h b/net/spdy/spdy_protocol.h index 49d8bdc..810d5b3 100644 --- a/net/spdy/spdy_protocol.h +++ b/net/spdy/spdy_protocol.h @@ -121,6 +121,9 @@ namespace spdy { // This implementation of Spdy is version 1. const int kSpdyProtocolVersion = 1; +// Default initial window size. +const int kInitialWindowSize = 64 * 1024; + // Note: all protocol data structures are on-the-wire format. That means that // data is stored in network-normalized order. Readers must use the // accessors provided or call ntohX() functions. @@ -184,7 +187,8 @@ enum SpdyStatusCodes { UNSUPPORTED_VERSION = 4, CANCEL = 5, INTERNAL_ERROR = 6, - NUM_STATUS_CODES = 7 + FLOW_CONTROL_ERROR = 7, + NUM_STATUS_CODES = 8 }; // A SPDY stream id is a 31 bit entity. @@ -403,9 +407,8 @@ class SpdyControlFrame : public SpdyFrame { } void set_version(uint16 version) { - const uint16 kControlBit = 0x80; - DCHECK_EQ(0, version & kControlBit); - mutable_block()->control_.version_ = kControlBit | htons(version); + DCHECK_EQ(0u, version & kControlFlagMask); + mutable_block()->control_.version_ = htons(kControlFlagMask | version); } SpdyControlType type() const { |