summaryrefslogtreecommitdiffstats
path: root/net/spdy/spdy_session.h
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-13 05:16:00 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-13 05:16:00 +0000
commit160df77f063adb9c9149e43e90d8a9c2e1b1523e (patch)
treee160d8a6dbeb87a441fc90f8745d3776d1b852df /net/spdy/spdy_session.h
parent1aa303dd453468928bf1945b7583156f4c798a90 (diff)
downloadchromium_src-160df77f063adb9c9149e43e90d8a9c2e1b1523e.zip
chromium_src-160df77f063adb9c9149e43e90d8a9c2e1b1523e.tar.gz
chromium_src-160df77f063adb9c9149e43e90d8a9c2e1b1523e.tar.bz2
Add --use-spdy option to control initial max concurrent streams.
e.g.: out/Debug/chrome --use-spdy=init-max-streams=100 BUG=none TEST=none Review URL: http://codereview.chromium.org/8258005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105266 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_session.h')
-rw-r--r--net/spdy/spdy_session.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/net/spdy/spdy_session.h b/net/spdy/spdy_session.h
index c3711a1..96b67f9 100644
--- a/net/spdy/spdy_session.h
+++ b/net/spdy/spdy_session.h
@@ -147,12 +147,20 @@ class NET_EXPORT SpdySession : public base::RefCounted<SpdySession>,
static void set_flow_control(bool enable) { use_flow_control_ = enable; }
static bool flow_control() { return use_flow_control_; }
- // Sets the max concurrent streams per session.
+ // Sets the max concurrent streams per session, as a ceiling on any server
+ // specific SETTINGS value.
static void set_max_concurrent_streams(size_t value) {
max_concurrent_stream_limit_ = value;
}
static size_t max_concurrent_streams() {
- return max_concurrent_stream_limit_;
+ return max_concurrent_stream_limit_;
+ }
+
+ // The initial max concurrent streams per session, can be overridden by the
+ // server via SETTINGS.
+ static void set_init_max_concurrent_streams(size_t value) {
+ init_max_concurrent_streams_ =
+ std::min(value, max_concurrent_stream_limit_);
}
// Send WINDOW_UPDATE frame, called by a stream whenever receive window
@@ -251,8 +259,6 @@ class NET_EXPORT SpdySession : public base::RefCounted<SpdySession>,
CLOSED
};
- enum { kDefaultMaxConcurrentStreams = 10 };
-
virtual ~SpdySession();
void ProcessPendingCreateStreams();
@@ -449,6 +455,7 @@ class NET_EXPORT SpdySession : public base::RefCounted<SpdySession>,
static bool use_ssl_;
static bool use_flow_control_;
+ static size_t init_max_concurrent_streams_;
static size_t max_concurrent_stream_limit_;
};