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 23 matching lines...) Expand all Loading... |
34 static const size_t kMinHandshakeTimeoutMs = 10; | 34 static const size_t kMinHandshakeTimeoutMs = 10; |
35 | 35 |
36 // Sends up to two tail loss probes before firing an RTO, | 36 // Sends up to two tail loss probes before firing an RTO, |
37 // per draft RFC draft-dukkipati-tcpm-tcp-loss-probe. | 37 // per draft RFC draft-dukkipati-tcpm-tcp-loss-probe. |
38 static const size_t kDefaultMaxTailLossProbes = 2; | 38 static const size_t kDefaultMaxTailLossProbes = 2; |
39 static const int64 kMinTailLossProbeTimeoutMs = 10; | 39 static const int64 kMinTailLossProbeTimeoutMs = 10; |
40 | 40 |
41 // Number of samples before we force a new recent min rtt to be captured. | 41 // Number of samples before we force a new recent min rtt to be captured. |
42 static const size_t kNumMinRttSamplesAfterQuiescence = 2; | 42 static const size_t kNumMinRttSamplesAfterQuiescence = 2; |
43 | 43 |
| 44 // Number of unpaced packets to send after quiescence. |
| 45 static const size_t kInitialUnpacedBurst = 10; |
| 46 |
44 bool HasCryptoHandshake(const TransmissionInfo& transmission_info) { | 47 bool HasCryptoHandshake(const TransmissionInfo& transmission_info) { |
45 if (transmission_info.retransmittable_frames == NULL) { | 48 if (transmission_info.retransmittable_frames == NULL) { |
46 return false; | 49 return false; |
47 } | 50 } |
48 return transmission_info.retransmittable_frames->HasCryptoHandshake() == | 51 return transmission_info.retransmittable_frames->HasCryptoHandshake() == |
49 IS_HANDSHAKE; | 52 IS_HANDSHAKE; |
50 } | 53 } |
51 | 54 |
52 } // namespace | 55 } // namespace |
53 | 56 |
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
801 } | 804 } |
802 | 805 |
803 if (using_pacing_) { | 806 if (using_pacing_) { |
804 return; | 807 return; |
805 } | 808 } |
806 | 809 |
807 // Set up a pacing sender with a 5 millisecond alarm granularity. | 810 // Set up a pacing sender with a 5 millisecond alarm granularity. |
808 using_pacing_ = true; | 811 using_pacing_ = true; |
809 send_algorithm_.reset( | 812 send_algorithm_.reset( |
810 new PacingSender(send_algorithm_.release(), | 813 new PacingSender(send_algorithm_.release(), |
811 QuicTime::Delta::FromMilliseconds(5))); | 814 QuicTime::Delta::FromMilliseconds(5), |
| 815 kInitialUnpacedBurst)); |
812 } | 816 } |
813 | 817 |
814 } // namespace net | 818 } // namespace net |
OLD | NEW |