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