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

Unified Diff: net/spdy/spdy_session.h

Issue 321513002: SpdySession go-away on network change (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix IPAddressChanged. Created 6 years, 6 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 | « no previous file | 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 d65ef4676270e21557e90a2752ed04b76670a290..6d94f24c975688a3788af2c1761a54a2386e8b74 100644
--- a/net/spdy/spdy_session.h
+++ b/net/spdy/spdy_session.h
@@ -61,6 +61,11 @@ 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;
+const SpdyStreamId kLastStreamId = 0x7fffffff;
+
class BoundNetLog;
struct LoadTimingInfo;
class SpdyStream;
@@ -365,6 +370,18 @@ class NET_EXPORT SpdySession : public BufferedSpdyFramerVisitorInterface,
// will not close any streams.
void MakeUnavailable();
+ // Closes all active streams with stream id's greater than
+ // |last_good_stream_id|, as well as any created or pending
+ // streams. Must be called only when |availability_state_| >=
+ // STATE_GOING_AWAY. After this function, DcheckGoingAway() will
+ // pass. May be called multiple times.
+ void StartGoingAway(SpdyStreamId last_good_stream_id, Error status);
+
+ // Must be called only when going away (i.e., DcheckGoingAway()
+ // passes). If there are no more active streams and the session
+ // isn't closed yet, close it.
+ void MaybeFinishGoingAway();
+
// Retrieves information on the current state of the SPDY session as a
// Value. Caller takes possession of the returned value.
base::Value* GetInfoAsValue() const;
@@ -738,18 +755,6 @@ class NET_EXPORT SpdySession : public BufferedSpdyFramerVisitorInterface,
// are no active streams or unclaimed pushed streams.
void DcheckDraining() const;
- // Closes all active streams with stream id's greater than
- // |last_good_stream_id|, as well as any created or pending
- // streams. Must be called only when |availability_state_| >=
- // STATE_GOING_AWAY. After this function, DcheckGoingAway() will
- // pass. May be called multiple times.
- void StartGoingAway(SpdyStreamId last_good_stream_id, Error status);
-
- // Must be called only when going away (i.e., DcheckGoingAway()
- // passes). If there are no more active streams and the session
- // isn't closed yet, close it.
- void MaybeFinishGoingAway();
-
// If the session is already draining, does nothing. Otherwise, moves
// the session to the draining state.
void DoDrainSession(Error err, const std::string& description);
« no previous file with comments | « no previous file | net/spdy/spdy_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698