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_QUIC_STREAM_SEQUENCER_BUFFER_H_ | 5 #ifndef NET_QUIC_QUIC_STREAM_SEQUENCER_BUFFER_H_ |
6 #define NET_QUIC_QUIC_STREAM_SEQUENCER_BUFFER_H_ | 6 #define NET_QUIC_QUIC_STREAM_SEQUENCER_BUFFER_H_ |
7 | 7 |
8 // QuicStreamSequencerBuffer implements QuicStreamSequencerBufferInterface. | 8 // QuicStreamSequencerBuffer 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 // size_t consumed = consume_iovs(iovs, iov_count); | 60 // size_t consumed = consume_iovs(iovs, iov_count); |
61 // buffer.MarkConsumed(consumed); | 61 // buffer.MarkConsumed(consumed); |
62 | 62 |
63 #include <stddef.h> | 63 #include <stddef.h> |
64 | 64 |
65 #include <functional> | 65 #include <functional> |
66 #include <list> | 66 #include <list> |
67 #include <memory> | 67 #include <memory> |
68 | 68 |
69 #include "base/macros.h" | 69 #include "base/macros.h" |
70 #include "net/quic/quic_protocol.h" | 70 #include "net/quic/core/quic_protocol.h" |
71 | 71 |
72 namespace net { | 72 namespace net { |
73 | 73 |
74 namespace test { | 74 namespace test { |
75 class QuicStreamSequencerBufferPeer; | 75 class QuicStreamSequencerBufferPeer; |
76 } // namespace test | 76 } // namespace test |
77 | 77 |
78 class NET_EXPORT_PRIVATE QuicStreamSequencerBuffer { | 78 class NET_EXPORT_PRIVATE QuicStreamSequencerBuffer { |
79 public: | 79 public: |
80 // A Gap indicates a missing chunk of bytes between | 80 // A Gap indicates a missing chunk of bytes between |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 size_t num_bytes_buffered_; | 237 size_t num_bytes_buffered_; |
238 | 238 |
239 // Stores all the buffered frames' start offset, length and arrival time. | 239 // Stores all the buffered frames' start offset, length and arrival time. |
240 std::map<QuicStreamOffset, FrameInfo> frame_arrival_time_map_; | 240 std::map<QuicStreamOffset, FrameInfo> frame_arrival_time_map_; |
241 | 241 |
242 DISALLOW_COPY_AND_ASSIGN(QuicStreamSequencerBuffer); | 242 DISALLOW_COPY_AND_ASSIGN(QuicStreamSequencerBuffer); |
243 }; | 243 }; |
244 } // namespace net | 244 } // namespace net |
245 | 245 |
246 #endif // NET_QUIC_QUIC_STREAM_SEQUENCER_BUFFER_H_ | 246 #endif // NET_QUIC_QUIC_STREAM_SEQUENCER_BUFFER_H_ |
OLD | NEW |