| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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_STREAM_SEQUENCER_BUFFER_H_ | 5 #ifndef NET_QUIC_STREAM_SEQUENCER_BUFFER_H_ |
| 6 #define NET_QUIC_STREAM_SEQUENCER_BUFFER_H_ | 6 #define NET_QUIC_STREAM_SEQUENCER_BUFFER_H_ |
| 7 | 7 |
| 8 // StreamSequencerBuffer implements QuicStreamSequencerBufferInterface. | 8 // StreamSequencerBuffer implements QuicStreamSequencerBufferInterface. |
| 9 // It is a circular stream buffer with random write and | 9 // It is a circular stream buffer with random write and |
| 10 // in-sequence read. It consists of a vector of pointers pointing | 10 // in-sequence read. It consists of a vector of pointers pointing |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 | 74 |
| 75 namespace test { | 75 namespace test { |
| 76 class StreamSequencerBufferPeer; | 76 class StreamSequencerBufferPeer; |
| 77 } // namespace test | 77 } // namespace test |
| 78 | 78 |
| 79 class NET_EXPORT_PRIVATE StreamSequencerBuffer | 79 class NET_EXPORT_PRIVATE StreamSequencerBuffer |
| 80 : public QuicStreamSequencerBufferInterface { | 80 : public QuicStreamSequencerBufferInterface { |
| 81 public: | 81 public: |
| 82 // A Gap indicates a missing chunk of bytes between | 82 // A Gap indicates a missing chunk of bytes between |
| 83 // [begin_offset, end_offset) in the stream | 83 // [begin_offset, end_offset) in the stream |
| 84 struct Gap { | 84 struct NET_EXPORT_PRIVATE Gap { |
| 85 Gap(QuicStreamOffset begin_offset, QuicStreamOffset end_offset); | 85 Gap(QuicStreamOffset begin_offset, QuicStreamOffset end_offset); |
| 86 QuicStreamOffset begin_offset; | 86 QuicStreamOffset begin_offset; |
| 87 QuicStreamOffset end_offset; | 87 QuicStreamOffset end_offset; |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 // A FrameInfo stores the length of a frame and the time it arrived. | 90 // A FrameInfo stores the length of a frame and the time it arrived. |
| 91 struct NET_EXPORT_PRIVATE FrameInfo { | 91 struct NET_EXPORT_PRIVATE FrameInfo { |
| 92 FrameInfo(); | 92 FrameInfo(); |
| 93 FrameInfo(size_t length, QuicTime timestamp); | 93 FrameInfo(size_t length, QuicTime timestamp); |
| 94 | 94 |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 size_t num_bytes_buffered_; | 194 size_t num_bytes_buffered_; |
| 195 | 195 |
| 196 // Stores all the buffered frames' start offset, length and arrival time. | 196 // Stores all the buffered frames' start offset, length and arrival time. |
| 197 std::map<QuicStreamOffset, FrameInfo> frame_arrival_time_map_; | 197 std::map<QuicStreamOffset, FrameInfo> frame_arrival_time_map_; |
| 198 | 198 |
| 199 DISALLOW_COPY_AND_ASSIGN(StreamSequencerBuffer); | 199 DISALLOW_COPY_AND_ASSIGN(StreamSequencerBuffer); |
| 200 }; | 200 }; |
| 201 } // namespace net | 201 } // namespace net |
| 202 | 202 |
| 203 #endif // NET_QUIC_STREAM_SEQUENCER_BUFFER_H_ | 203 #endif // NET_QUIC_STREAM_SEQUENCER_BUFFER_H_ |
| OLD | NEW |