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 #ifndef NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ | 5 #ifndef NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ |
6 #define NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ | 6 #define NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
315 // Returns the retransmission timeout, after which a full RTO occurs. | 315 // Returns the retransmission timeout, after which a full RTO occurs. |
316 const QuicTime::Delta GetRetransmissionDelay() const; | 316 const QuicTime::Delta GetRetransmissionDelay() const; |
317 | 317 |
318 // Returns the newest transmission associated with a packet. | 318 // Returns the newest transmission associated with a packet. |
319 QuicPacketNumber GetNewestRetransmission( | 319 QuicPacketNumber GetNewestRetransmission( |
320 QuicPacketNumber packet_number, | 320 QuicPacketNumber packet_number, |
321 const TransmissionInfo& transmission_info) const; | 321 const TransmissionInfo& transmission_info) const; |
322 | 322 |
323 // Update the RTT if the ack is for the largest acked packet number. | 323 // Update the RTT if the ack is for the largest acked packet number. |
324 // Returns true if the rtt was updated. | 324 // Returns true if the rtt was updated. |
325 bool MaybeUpdateRTT(const QuicAckFrame& ack_frame, | 325 bool MaybeUpdateRTT(const QuicAckFrame& ack_frame, QuicTime ack_receive_time); |
326 const QuicTime& ack_receive_time); | |
327 | 326 |
328 // Invokes the loss detection algorithm and loses and retransmits packets if | 327 // Invokes the loss detection algorithm and loses and retransmits packets if |
329 // necessary. | 328 // necessary. |
330 void InvokeLossDetection(QuicTime time); | 329 void InvokeLossDetection(QuicTime time); |
331 | 330 |
332 // Invokes OnCongestionEvent if |rtt_updated| is true, there are pending acks, | 331 // Invokes OnCongestionEvent if |rtt_updated| is true, there are pending acks, |
333 // or pending losses. Clears pending acks and pending losses afterwards. | 332 // or pending losses. Clears pending acks and pending losses afterwards. |
334 // |bytes_in_flight| is the number of bytes in flight before the losses or | 333 // |bytes_in_flight| is the number of bytes in flight before the losses or |
335 // acks. | 334 // acks. |
336 void MaybeInvokeCongestionEvent(bool rtt_updated, | 335 void MaybeInvokeCongestionEvent(bool rtt_updated, |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 // Records bandwidth from server to client in normal operation, over periods | 448 // Records bandwidth from server to client in normal operation, over periods |
450 // of time with no loss events. | 449 // of time with no loss events. |
451 QuicSustainedBandwidthRecorder sustained_bandwidth_recorder_; | 450 QuicSustainedBandwidthRecorder sustained_bandwidth_recorder_; |
452 | 451 |
453 DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManager); | 452 DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManager); |
454 }; | 453 }; |
455 | 454 |
456 } // namespace net | 455 } // namespace net |
457 | 456 |
458 #endif // NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ | 457 #endif // NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ |
OLD | NEW |