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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 const QuicPacketHeader& header, | 109 const QuicPacketHeader& header, |
110 QuicTime receipt_time); | 110 QuicTime receipt_time); |
111 | 111 |
112 // Checks whether |packet_number| is missing and less than largest observed. | 112 // Checks whether |packet_number| is missing and less than largest observed. |
113 virtual bool IsMissing(QuicPacketNumber packet_number); | 113 virtual bool IsMissing(QuicPacketNumber packet_number); |
114 | 114 |
115 // 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|. |
116 virtual bool IsAwaitingPacket(QuicPacketNumber packet_number); | 116 virtual bool IsAwaitingPacket(QuicPacketNumber packet_number); |
117 | 117 |
118 // Update the |ack_frame| for an outgoing ack. | 118 // Update the |ack_frame| for an outgoing ack. |
| 119 // TODO(ianswett): Deprecate with |
| 120 // gfe2_reloadable_flag_quic_dont_copy_ack_frames. |
119 void UpdateReceivedPacketInfo(QuicAckFrame* ack_frame, | 121 void UpdateReceivedPacketInfo(QuicAckFrame* ack_frame, |
120 QuicTime approximate_now); | 122 QuicTime approximate_now); |
121 | 123 |
| 124 // Retrieves a frame containing a QuicAckFrame. The ack frame may not be |
| 125 // changed outside QuicReceivedPacketManager and must be serialized before |
| 126 // another packet is received, or it will change. |
| 127 const QuicFrame GetUpdatedAckFrame(QuicTime approximate_now); |
| 128 |
122 // QuicReceivedEntropyHashCalculatorInterface | 129 // QuicReceivedEntropyHashCalculatorInterface |
123 // Called by QuicFramer, when the outgoing ack gets truncated, to recalculate | 130 // Called by QuicFramer, when the outgoing ack gets truncated, to recalculate |
124 // the received entropy hash for the truncated ack frame. | 131 // the received entropy hash for the truncated ack frame. |
125 QuicPacketEntropyHash EntropyHash( | 132 QuicPacketEntropyHash EntropyHash( |
126 QuicPacketNumber packet_number) const override; | 133 QuicPacketNumber packet_number) const override; |
127 | 134 |
128 // Updates internal state based on |stop_waiting|. | 135 // Updates internal state based on |stop_waiting|. |
129 virtual void UpdatePacketInformationSentByPeer( | 136 virtual void UpdatePacketInformationSentByPeer( |
130 const QuicStopWaitingFrame& stop_waiting); | 137 const QuicStopWaitingFrame& stop_waiting); |
131 | 138 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 QuicTime time_largest_observed_; | 185 QuicTime time_largest_observed_; |
179 | 186 |
180 QuicConnectionStats* stats_; | 187 QuicConnectionStats* stats_; |
181 | 188 |
182 DISALLOW_COPY_AND_ASSIGN(QuicReceivedPacketManager); | 189 DISALLOW_COPY_AND_ASSIGN(QuicReceivedPacketManager); |
183 }; | 190 }; |
184 | 191 |
185 } // namespace net | 192 } // namespace net |
186 | 193 |
187 #endif // NET_QUIC_QUIC_RECEIVED_PACKET_MANAGER_H_ | 194 #endif // NET_QUIC_QUIC_RECEIVED_PACKET_MANAGER_H_ |
OLD | NEW |