OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_QUIC_QUIC_STREAM_SEQUENCER_H_ | 5 #ifndef NET_QUIC_QUIC_STREAM_SEQUENCER_H_ |
6 #define NET_QUIC_QUIC_STREAM_SEQUENCER_H_ | 6 #define NET_QUIC_QUIC_STREAM_SEQUENCER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 int num_frames_received() const { return num_frames_received_; } | 88 int num_frames_received() const { return num_frames_received_; } |
89 | 89 |
90 int num_duplicate_frames_received() const { | 90 int num_duplicate_frames_received() const { |
91 return num_duplicate_frames_received_; | 91 return num_duplicate_frames_received_; |
92 } | 92 } |
93 | 93 |
94 int num_early_frames_received() const { return num_early_frames_received_; } | 94 int num_early_frames_received() const { return num_early_frames_received_; } |
95 | 95 |
96 bool ignore_read_data() const { return ignore_read_data_; } | 96 bool ignore_read_data() const { return ignore_read_data_; } |
97 | 97 |
| 98 // Returns std::string describing internal state. |
| 99 const std::string DebugString() const; |
| 100 |
98 private: | 101 private: |
99 friend class test::QuicStreamSequencerPeer; | 102 friend class test::QuicStreamSequencerPeer; |
100 | 103 |
101 // Deletes and records as consumed any buffered data that is now in-sequence. | 104 // Deletes and records as consumed any buffered data that is now in-sequence. |
102 // (To be called only after StopReading has been called.) | 105 // (To be called only after StopReading has been called.) |
103 void FlushBufferedFrames(); | 106 void FlushBufferedFrames(); |
104 | 107 |
105 // Wait until we've seen 'offset' bytes, and then terminate the stream. | 108 // Wait until we've seen 'offset' bytes, and then terminate the stream. |
106 void CloseStreamAtOffset(QuicStreamOffset offset); | 109 void CloseStreamAtOffset(QuicStreamOffset offset); |
107 | 110 |
(...skipping 30 matching lines...) Expand all Loading... |
138 | 141 |
139 // If true, all incoming data will be discarded. | 142 // If true, all incoming data will be discarded. |
140 bool ignore_read_data_; | 143 bool ignore_read_data_; |
141 | 144 |
142 DISALLOW_COPY_AND_ASSIGN(QuicStreamSequencer); | 145 DISALLOW_COPY_AND_ASSIGN(QuicStreamSequencer); |
143 }; | 146 }; |
144 | 147 |
145 } // namespace net | 148 } // namespace net |
146 | 149 |
147 #endif // NET_QUIC_QUIC_STREAM_SEQUENCER_H_ | 150 #endif // NET_QUIC_QUIC_STREAM_SEQUENCER_H_ |
OLD | NEW |