| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 57 |
| 58 // QuicReceivedEntropyHashCalculatorInterface | 58 // QuicReceivedEntropyHashCalculatorInterface |
| 59 // Called by QuicFramer, when the outgoing ack gets truncated, to recalculate | 59 // Called by QuicFramer, when the outgoing ack gets truncated, to recalculate |
| 60 // the received entropy hash for the truncated ack frame. | 60 // the received entropy hash for the truncated ack frame. |
| 61 virtual QuicPacketEntropyHash EntropyHash( | 61 virtual QuicPacketEntropyHash EntropyHash( |
| 62 QuicPacketSequenceNumber sequence_number) const OVERRIDE; | 62 QuicPacketSequenceNumber sequence_number) const OVERRIDE; |
| 63 | 63 |
| 64 // Updates internal state based on |received_info|. | 64 // Updates internal state based on |received_info|. |
| 65 void UpdatePacketInformationReceivedByPeer( | 65 void UpdatePacketInformationReceivedByPeer( |
| 66 const ReceivedPacketInfo& received_nfo); | 66 const ReceivedPacketInfo& received_nfo); |
| 67 // Updates internal state based on |sent_info|. | 67 // Updates internal state based on |stop_waiting|. |
| 68 void UpdatePacketInformationSentByPeer(const SentPacketInfo& sent_info); | 68 void UpdatePacketInformationSentByPeer( |
| 69 const QuicStopWaitingFrame& stop_waiting); |
| 69 | 70 |
| 70 // Returns whether the peer is missing packets. | 71 // Returns whether the peer is missing packets. |
| 71 bool HasMissingPackets(); | 72 bool HasMissingPackets(); |
| 72 | 73 |
| 73 // Returns true when there are new missing packets to be reported within 3 | 74 // Returns true when there are new missing packets to be reported within 3 |
| 74 // packets of the largest observed. | 75 // packets of the largest observed. |
| 75 bool HasNewMissingPackets(); | 76 bool HasNewMissingPackets(); |
| 76 | 77 |
| 77 QuicPacketSequenceNumber peer_largest_observed_packet() { | 78 QuicPacketSequenceNumber peer_largest_observed_packet() { |
| 78 return peer_largest_observed_packet_; | 79 return peer_largest_observed_packet_; |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 // no sequence numbers have been received since UpdateReceivedPacketInfo. | 143 // no sequence numbers have been received since UpdateReceivedPacketInfo. |
| 143 // Needed for calculating delta_time_largest_observed. | 144 // Needed for calculating delta_time_largest_observed. |
| 144 QuicTime time_largest_observed_; | 145 QuicTime time_largest_observed_; |
| 145 | 146 |
| 146 scoped_ptr<ReceiveAlgorithmInterface> receive_algorithm_; | 147 scoped_ptr<ReceiveAlgorithmInterface> receive_algorithm_; |
| 147 }; | 148 }; |
| 148 | 149 |
| 149 } // namespace net | 150 } // namespace net |
| 150 | 151 |
| 151 #endif // NET_QUIC_QUIC_RECEIVED_PACKET_MANAGER_H_ | 152 #endif // NET_QUIC_QUIC_RECEIVED_PACKET_MANAGER_H_ |
| OLD | NEW |