Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Side by Side Diff: net/quic/quic_sent_packet_manager.cc

Issue 367853003: Change QUIC's pacer to allow a 10 packet burst when the connection comes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/quic/congestion_control/pacing_sender_test.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « net/quic/congestion_control/pacing_sender_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698