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

Unified Diff: net/quic/quic_stream_sequencer.h

Issue 334603002: QuicStreamSequencer closes the connection on receipt of frames overlapping with buffered data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/quic/quic_stream_sequencer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_stream_sequencer.h
diff --git a/net/quic/quic_stream_sequencer.h b/net/quic/quic_stream_sequencer.h
index da2cf413e1afbebf5356ac45218cf63ac82fdef2..a4580a9ca3f9c52e1577b1230c8b4de70ec59c7d 100644
--- a/net/quic/quic_stream_sequencer.h
+++ b/net/quic/quic_stream_sequencer.h
@@ -58,6 +58,10 @@ class NET_EXPORT_PRIVATE QuicStreamSequencer {
// Returns true if the sequencer has received this frame before.
bool IsDuplicate(const QuicStreamFrame& frame) const;
+ // Returns true if |frame| contains data which overlaps buffered data
+ // (indicating an invalid stream frame has been received).
+ bool FrameOverlapsBufferedData(const QuicStreamFrame& frame) const;
+
// Calls |ProcessRawData| on |stream_| for each buffered frame that may
// be processed.
void FlushBufferedFrames();
@@ -95,6 +99,10 @@ class NET_EXPORT_PRIVATE QuicStreamSequencer {
QuicStreamOffset num_bytes_consumed_;
// TODO(alyssar) use something better than strings.
+ // TODO(rjshade): In future we may support retransmission of partial stream
+ // frames, in which case we will have to allow receipt of overlapping frames.
+ // Maybe write new frames into a ring buffer, and keep track of consumed
+ // bytes, and gaps.
typedef map<QuicStreamOffset, string> FrameMap;
// Stores buffered frames (maps from sequence number -> frame data as string).
« no previous file with comments | « no previous file | net/quic/quic_stream_sequencer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698