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

Side by Side Diff: net/quic/congestion_control/tcp_loss_algorithm.cc

Issue 683113005: Update from chromium https://crrev.com/302282 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « net/quic/congestion_control/tcp_loss_algorithm.h ('k') | net/quic/crypto/common_cert_set.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/congestion_control/tcp_loss_algorithm.h" 5 #include "net/quic/congestion_control/tcp_loss_algorithm.h"
6 6
7 #include "net/quic/congestion_control/rtt_stats.h" 7 #include "net/quic/congestion_control/rtt_stats.h"
8 #include "net/quic/quic_protocol.h" 8 #include "net/quic/quic_protocol.h"
9 9
10 namespace net { 10 namespace net {
11 11
12 namespace { 12 namespace {
13
14 // TCP retransmits after 3 nacks.
15 static const size_t kNumberOfNacksBeforeRetransmission = 3;
16
17 // How many RTTs the algorithm waits before determining a packet is lost due 13 // How many RTTs the algorithm waits before determining a packet is lost due
18 // to early retransmission. 14 // to early retransmission.
19 static const double kEarlyRetransmitLossDelayMultiplier = 1.25; 15 static const double kEarlyRetransmitLossDelayMultiplier = 1.25;
20
21 } 16 }
22 17
23 TCPLossAlgorithm::TCPLossAlgorithm() 18 TCPLossAlgorithm::TCPLossAlgorithm()
24 : loss_detection_timeout_(QuicTime::Zero()) { } 19 : loss_detection_timeout_(QuicTime::Zero()) { }
25 20
26 LossDetectionType TCPLossAlgorithm::GetLossDetectionType() const { 21 LossDetectionType TCPLossAlgorithm::GetLossDetectionType() const {
27 return kNack; 22 return kNack;
28 } 23 }
29 24
30 // Uses nack counts to decide when packets are lost. 25 // Uses nack counts to decide when packets are lost.
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 } 68 }
74 69
75 return lost_packets; 70 return lost_packets;
76 } 71 }
77 72
78 QuicTime TCPLossAlgorithm::GetLossTimeout() const { 73 QuicTime TCPLossAlgorithm::GetLossTimeout() const {
79 return loss_detection_timeout_; 74 return loss_detection_timeout_;
80 } 75 }
81 76
82 } // namespace net 77 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/congestion_control/tcp_loss_algorithm.h ('k') | net/quic/crypto/common_cert_set.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698