OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // Manages the packet entropy calculation for both sent and received packets | 5 // Manages the packet entropy calculation for both sent and received packets |
6 // for a connection. | 6 // for a connection. |
7 | 7 |
8 #ifndef NET_QUIC_QUIC_RECEIVED_PACKET_MANAGER_H_ | 8 #ifndef NET_QUIC_QUIC_RECEIVED_PACKET_MANAGER_H_ |
9 #define NET_QUIC_QUIC_RECEIVED_PACKET_MANAGER_H_ | 9 #define NET_QUIC_QUIC_RECEIVED_PACKET_MANAGER_H_ |
10 | 10 |
11 #include <deque> | 11 #include <deque> |
12 | 12 |
13 #include "net/quic/congestion_control/receive_algorithm_interface.h" | 13 #include "net/quic/congestion_control/receive_algorithm_interface.h" |
| 14 #include "net/quic/quic_config.h" |
14 #include "net/quic/quic_framer.h" | 15 #include "net/quic/quic_framer.h" |
15 #include "net/quic/quic_protocol.h" | 16 #include "net/quic/quic_protocol.h" |
16 | 17 |
17 namespace net { | 18 namespace net { |
18 | 19 |
19 namespace test { | 20 namespace test { |
20 class EntropyTrackerPeer; | 21 class EntropyTrackerPeer; |
21 class QuicConnectionPeer; | 22 class QuicConnectionPeer; |
22 class QuicReceivedPacketManagerPeer; | 23 class QuicReceivedPacketManagerPeer; |
23 } // namespace test | 24 } // namespace test |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // contain entries for all received packets with sequence_number > | 88 // contain entries for all received packets with sequence_number > |
88 // first_gap_. | 89 // first_gap_. |
89 QuicPacketSequenceNumber first_gap_; | 90 QuicPacketSequenceNumber first_gap_; |
90 | 91 |
91 // Sequence number of the largest observed packet. | 92 // Sequence number of the largest observed packet. |
92 QuicPacketSequenceNumber largest_observed_; | 93 QuicPacketSequenceNumber largest_observed_; |
93 | 94 |
94 DISALLOW_COPY_AND_ASSIGN(EntropyTracker); | 95 DISALLOW_COPY_AND_ASSIGN(EntropyTracker); |
95 }; | 96 }; |
96 | 97 |
97 explicit QuicReceivedPacketManager(CongestionFeedbackType congestion_type, | 98 explicit QuicReceivedPacketManager(QuicConnectionStats* stats); |
98 QuicConnectionStats* stats); | |
99 virtual ~QuicReceivedPacketManager(); | 99 virtual ~QuicReceivedPacketManager(); |
100 | 100 |
101 // Updates the internal state concerning which packets have been received. | 101 // Updates the internal state concerning which packets have been received. |
102 // bytes: the packet size in bytes including Quic Headers. | 102 // bytes: the packet size in bytes including Quic Headers. |
103 // header: the packet header. | 103 // header: the packet header. |
104 // timestamp: the arrival time of the packet. | 104 // timestamp: the arrival time of the packet. |
105 void RecordPacketReceived(QuicByteCount bytes, | 105 void RecordPacketReceived(QuicByteCount bytes, |
106 const QuicPacketHeader& header, | 106 const QuicPacketHeader& header, |
107 QuicTime receipt_time); | 107 QuicTime receipt_time); |
108 | 108 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 | 165 |
166 // The time we received the largest_observed sequence number, or zero if | 166 // The time we received the largest_observed sequence number, or zero if |
167 // no sequence numbers have been received since UpdateReceivedPacketInfo. | 167 // no sequence numbers have been received since UpdateReceivedPacketInfo. |
168 // Needed for calculating delta_time_largest_observed. | 168 // Needed for calculating delta_time_largest_observed. |
169 QuicTime time_largest_observed_; | 169 QuicTime time_largest_observed_; |
170 | 170 |
171 scoped_ptr<ReceiveAlgorithmInterface> receive_algorithm_; | 171 scoped_ptr<ReceiveAlgorithmInterface> receive_algorithm_; |
172 | 172 |
173 QuicConnectionStats* stats_; | 173 QuicConnectionStats* stats_; |
174 | 174 |
| 175 PacketTimeList received_packet_times_; |
| 176 |
175 DISALLOW_COPY_AND_ASSIGN(QuicReceivedPacketManager); | 177 DISALLOW_COPY_AND_ASSIGN(QuicReceivedPacketManager); |
176 }; | 178 }; |
177 | 179 |
178 } // namespace net | 180 } // namespace net |
179 | 181 |
180 #endif // NET_QUIC_QUIC_RECEIVED_PACKET_MANAGER_H_ | 182 #endif // NET_QUIC_QUIC_RECEIVED_PACKET_MANAGER_H_ |
OLD | NEW |