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 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 // packet number of the largest observed packet. | 96 // packet number of the largest observed packet. |
97 QuicPacketNumber largest_observed_; | 97 QuicPacketNumber largest_observed_; |
98 | 98 |
99 DISALLOW_COPY_AND_ASSIGN(EntropyTracker); | 99 DISALLOW_COPY_AND_ASSIGN(EntropyTracker); |
100 }; | 100 }; |
101 | 101 |
102 explicit QuicReceivedPacketManager(QuicConnectionStats* stats); | 102 explicit QuicReceivedPacketManager(QuicConnectionStats* stats); |
103 ~QuicReceivedPacketManager() override; | 103 ~QuicReceivedPacketManager() override; |
104 | 104 |
105 // Updates the internal state concerning which packets have been received. | 105 // Updates the internal state concerning which packets have been received. |
106 // bytes: the packet size in bytes including Quic Headers. | |
107 // header: the packet header. | 106 // header: the packet header. |
108 // timestamp: the arrival time of the packet. | 107 // timestamp: the arrival time of the packet. |
109 virtual void RecordPacketReceived(QuicByteCount bytes, | 108 virtual void RecordPacketReceived(const QuicPacketHeader& header, |
110 const QuicPacketHeader& header, | |
111 QuicTime receipt_time); | 109 QuicTime receipt_time); |
112 | 110 |
113 // Checks whether |packet_number| is missing and less than largest observed. | 111 // Checks whether |packet_number| is missing and less than largest observed. |
114 virtual bool IsMissing(QuicPacketNumber packet_number); | 112 virtual bool IsMissing(QuicPacketNumber packet_number); |
115 | 113 |
116 // Checks if we're still waiting for the packet with |packet_number|. | 114 // Checks if we're still waiting for the packet with |packet_number|. |
117 virtual bool IsAwaitingPacket(QuicPacketNumber packet_number); | 115 virtual bool IsAwaitingPacket(QuicPacketNumber packet_number); |
118 | 116 |
119 // Retrieves a frame containing a QuicAckFrame. The ack frame may not be | 117 // Retrieves a frame containing a QuicAckFrame. The ack frame may not be |
120 // changed outside QuicReceivedPacketManager and must be serialized before | 118 // changed outside QuicReceivedPacketManager and must be serialized before |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 QuicTime time_largest_observed_; | 183 QuicTime time_largest_observed_; |
186 | 184 |
187 QuicConnectionStats* stats_; | 185 QuicConnectionStats* stats_; |
188 | 186 |
189 DISALLOW_COPY_AND_ASSIGN(QuicReceivedPacketManager); | 187 DISALLOW_COPY_AND_ASSIGN(QuicReceivedPacketManager); |
190 }; | 188 }; |
191 | 189 |
192 } // namespace net | 190 } // namespace net |
193 | 191 |
194 #endif // NET_QUIC_QUIC_RECEIVED_PACKET_MANAGER_H_ | 192 #endif // NET_QUIC_QUIC_RECEIVED_PACKET_MANAGER_H_ |
OLD | NEW |