| 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 #include "net/quic/quic_sent_packet_manager.h" | 5 #include "net/quic/quic_sent_packet_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 // Minimum number of consecutive RTOs before path is considered to be degrading. | 40 // Minimum number of consecutive RTOs before path is considered to be degrading. |
| 41 const size_t kMinTimeoutsBeforePathDegrading = 2; | 41 const size_t kMinTimeoutsBeforePathDegrading = 2; |
| 42 | 42 |
| 43 // Ensure the handshake timer isnt't faster than 10ms. | 43 // Ensure the handshake timer isnt't faster than 10ms. |
| 44 // This limits the tenth retransmitted packet to 10s after the initial CHLO. | 44 // This limits the tenth retransmitted packet to 10s after the initial CHLO. |
| 45 static const int64_t kMinHandshakeTimeoutMs = 10; | 45 static const int64_t kMinHandshakeTimeoutMs = 10; |
| 46 | 46 |
| 47 // Sends up to two tail loss probes before firing an RTO, | 47 // Sends up to two tail loss probes before firing an RTO, |
| 48 // per draft RFC draft-dukkipati-tcpm-tcp-loss-probe. | 48 // per draft RFC draft-dukkipati-tcpm-tcp-loss-probe. |
| 49 static const size_t kDefaultMaxTailLossProbes = 2; | 49 static const size_t kDefaultMaxTailLossProbes = 2; |
| 50 static const int64_t kMinTailLossProbeTimeoutMs = 10; | |
| 51 | 50 |
| 52 // Number of unpaced packets to send after quiescence. | 51 // Number of unpaced packets to send after quiescence. |
| 53 static const size_t kInitialUnpacedBurst = 10; | 52 static const size_t kInitialUnpacedBurst = 10; |
| 54 | 53 |
| 55 bool HasCryptoHandshake(const TransmissionInfo& transmission_info) { | 54 bool HasCryptoHandshake(const TransmissionInfo& transmission_info) { |
| 56 DCHECK(!transmission_info.has_crypto_handshake || | 55 DCHECK(!transmission_info.has_crypto_handshake || |
| 57 !transmission_info.retransmittable_frames.empty()); | 56 !transmission_info.retransmittable_frames.empty()); |
| 58 return transmission_info.has_crypto_handshake; | 57 return transmission_info.has_crypto_handshake; |
| 59 } | 58 } |
| 60 | 59 |
| (...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 975 TransmissionInfo* QuicSentPacketManager::GetMutableTransmissionInfo( | 974 TransmissionInfo* QuicSentPacketManager::GetMutableTransmissionInfo( |
| 976 QuicPacketNumber packet_number) { | 975 QuicPacketNumber packet_number) { |
| 977 return unacked_packets_.GetMutableTransmissionInfo(packet_number); | 976 return unacked_packets_.GetMutableTransmissionInfo(packet_number); |
| 978 } | 977 } |
| 979 | 978 |
| 980 void QuicSentPacketManager::RemoveObsoletePackets() { | 979 void QuicSentPacketManager::RemoveObsoletePackets() { |
| 981 unacked_packets_.RemoveObsoletePackets(); | 980 unacked_packets_.RemoveObsoletePackets(); |
| 982 } | 981 } |
| 983 | 982 |
| 984 } // namespace net | 983 } // namespace net |
| OLD | NEW |