| 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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. | 105 // bytes: the packet size in bytes including Quic Headers. |
| 106 // header: the packet header. | 106 // header: the packet header. |
| 107 // timestamp: the arrival time of the packet. | 107 // timestamp: the arrival time of the packet. |
| 108 virtual void RecordPacketReceived(QuicByteCount bytes, | 108 virtual void RecordPacketReceived(QuicByteCount bytes, |
| 109 const QuicPacketHeader& header, | 109 const QuicPacketHeader& header, |
| 110 QuicTime receipt_time); | 110 QuicTime receipt_time); |
| 111 | 111 |
| 112 virtual void RecordPacketRevived(QuicPacketNumber packet_number); | |
| 113 | |
| 114 // Checks whether |packet_number| is missing and less than largest observed. | 112 // Checks whether |packet_number| is missing and less than largest observed. |
| 115 virtual bool IsMissing(QuicPacketNumber packet_number); | 113 virtual bool IsMissing(QuicPacketNumber packet_number); |
| 116 | 114 |
| 117 // Checks if we're still waiting for the packet with |packet_number|. | 115 // Checks if we're still waiting for the packet with |packet_number|. |
| 118 virtual bool IsAwaitingPacket(QuicPacketNumber packet_number); | 116 virtual bool IsAwaitingPacket(QuicPacketNumber packet_number); |
| 119 | 117 |
| 120 // Update the |ack_frame| for an outgoing ack. | 118 // Update the |ack_frame| for an outgoing ack. |
| 121 void UpdateReceivedPacketInfo(QuicAckFrame* ack_frame, | 119 void UpdateReceivedPacketInfo(QuicAckFrame* ack_frame, |
| 122 QuicTime approximate_now); | 120 QuicTime approximate_now); |
| 123 | 121 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 QuicTime time_largest_observed_; | 178 QuicTime time_largest_observed_; |
| 181 | 179 |
| 182 QuicConnectionStats* stats_; | 180 QuicConnectionStats* stats_; |
| 183 | 181 |
| 184 DISALLOW_COPY_AND_ASSIGN(QuicReceivedPacketManager); | 182 DISALLOW_COPY_AND_ASSIGN(QuicReceivedPacketManager); |
| 185 }; | 183 }; |
| 186 | 184 |
| 187 } // namespace net | 185 } // namespace net |
| 188 | 186 |
| 189 #endif // NET_QUIC_QUIC_RECEIVED_PACKET_MANAGER_H_ | 187 #endif // NET_QUIC_QUIC_RECEIVED_PACKET_MANAGER_H_ |
| OLD | NEW |