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

Unified Diff: net/quic/reliable_quic_stream.h

Issue 327393002: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile error 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 | « net/quic/quic_stream_sequencer_test.cc ('k') | net/quic/reliable_quic_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/reliable_quic_stream.h
diff --git a/net/quic/reliable_quic_stream.h b/net/quic/reliable_quic_stream.h
index 9d8fe888fc2343050f11fbace7f0490fdd6e34d8..0774c93bad67f32ed17c4e9366ecc5a8f6925bbb 100644
--- a/net/quic/reliable_quic_stream.h
+++ b/net/quic/reliable_quic_stream.h
@@ -113,6 +113,14 @@ class NET_EXPORT_PRIVATE ReliableQuicStream {
// control window or the connection flow control window.
bool IsFlowControlBlocked();
+ // Returns true if we have received either a RST or a FIN - either of which
+ // gives a definitive number of bytes which the peer has sent. If this is not
+ // true on stream termination the session must keep track of the stream's byte
+ // offset until a definitive final value arrives.
+ bool HasFinalReceivedByteOffset() const {
+ return fin_received_ || rst_received_;
+ }
+
protected:
// Sends as much of 'data' to the connection as the connection will consume,
// and then buffers any remaining data in queued_data_.
@@ -199,10 +207,17 @@ class NET_EXPORT_PRIVATE ReliableQuicStream {
bool fin_buffered_;
bool fin_sent_;
+ // True if this stream has received (and the sequencer has accepted) a
+ // StreamFrame with the FIN set.
+ bool fin_received_;
+
// In combination with fin_sent_, used to ensure that a FIN and/or a RST is
// always sent before stream termination.
bool rst_sent_;
+ // True if this stream has received a RST stream frame.
+ bool rst_received_;
+
// True if the session this stream is running under is a server session.
bool is_server_;
« no previous file with comments | « net/quic/quic_stream_sequencer_test.cc ('k') | net/quic/reliable_quic_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698