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

Unified Diff: net/quic/quic_session.h

Issue 23587004: If the stream is being closed locally (for example in the case of a (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests Created 7 years, 4 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/quic/quic_protocol.h ('k') | net/quic/quic_session.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_session.h
diff --git a/net/quic/quic_session.h b/net/quic/quic_session.h
index 75c3ea0fdacd640dd4d32fec43296d917db22c40..c37b6e11c317164e90f826fafed27941f7e8396e 100644
--- a/net/quic/quic_session.h
+++ b/net/quic/quic_session.h
@@ -211,6 +211,24 @@ class NET_EXPORT_PRIVATE QuicSession : public QuicConnectionVisitorInterface {
typedef base::hash_map<QuicStreamId, ReliableQuicStream*> ReliableStreamMap;
+ // Performs the work required to close |stream_id|. If |locally_reset|
+ // then the stream has been reset by this endpoint, not by the peer. This
+ // means the stream may become a zombie stream which needs to stay
+ // around until headers have been decompressed.
+ void CloseStreamInner(QuicStreamId stream_id, bool locally_reset);
+
+ // Adds |stream_id| to the zobmie stream map, closing the oldest
+ // zombie stream if the set is full.
+ void AddZombieStream(QuicStreamId stream_id);
+
+ // Closes the zombie stream |stream_id| and removes it from the zombie
+ // stream map.
+ void CloseZombieStream(QuicStreamId stream_id);
+
+ // Adds |stream_id| to the prematurely closed stream map, removing the
+ // oldest prematurely closed stream if the set is full.
+ void AddPrematurelyClosedStream(QuicStreamId stream_id);
+
scoped_ptr<QuicConnection> connection_;
// Tracks the last 20 streams which closed without decompressing headers.
@@ -218,6 +236,12 @@ class NET_EXPORT_PRIVATE QuicSession : public QuicConnectionVisitorInterface {
// Ideally this would be a linked_hash_set as the boolean is unused.
linked_hash_map<QuicStreamId, bool> prematurely_closed_streams_;
+ // Streams which have been locally reset before decompressing headers
+ // from the peer. These streams need to stay open long enough to
+ // process any headers from the peer.
+ // Ideally this would be a linked_hash_set as the boolean is unused.
+ linked_hash_map<QuicStreamId, bool> zombie_streams_;
+
// A shim to stand between the connection and the session, to handle stream
// deletions.
scoped_ptr<VisitorShim> visitor_shim_;
« no previous file with comments | « net/quic/quic_protocol.h ('k') | net/quic/quic_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698