OLD | NEW |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/prr_sender.h" | 5 #include "net/quic/core/congestion_control/prr_sender.h" |
6 | 6 |
7 #include "net/quic/quic_protocol.h" | 7 #include "net/quic/core/quic_protocol.h" |
8 | 8 |
9 namespace net { | 9 namespace net { |
10 | 10 |
11 namespace { | 11 namespace { |
12 // Constant based on TCP defaults. | 12 // Constant based on TCP defaults. |
13 const QuicByteCount kMaxSegmentSize = kDefaultTCPMSS; | 13 const QuicByteCount kMaxSegmentSize = kDefaultTCPMSS; |
14 } // namespace | 14 } // namespace |
15 | 15 |
16 PrrSender::PrrSender() | 16 PrrSender::PrrSender() |
17 : bytes_sent_since_loss_(0), | 17 : bytes_sent_since_loss_(0), |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 // AvailableSendWindow = | 62 // AvailableSendWindow = |
63 // CEIL(prr_delivered * ssthresh / BytesInFlightAtLoss) - prr_sent | 63 // CEIL(prr_delivered * ssthresh / BytesInFlightAtLoss) - prr_sent |
64 if (bytes_delivered_since_loss_ * slowstart_threshold > | 64 if (bytes_delivered_since_loss_ * slowstart_threshold > |
65 bytes_sent_since_loss_ * bytes_in_flight_before_loss_) { | 65 bytes_sent_since_loss_ * bytes_in_flight_before_loss_) { |
66 return QuicTime::Delta::Zero(); | 66 return QuicTime::Delta::Zero(); |
67 } | 67 } |
68 return QuicTime::Delta::Infinite(); | 68 return QuicTime::Delta::Infinite(); |
69 } | 69 } |
70 | 70 |
71 } // namespace net | 71 } // namespace net |
OLD | NEW |