OLD | NEW |
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 // A test only class to enable simulations of send algorithms. | 5 // A test only class to enable simulations of send algorithms. |
6 | 6 |
7 #ifndef NET_QUIC_CONGESTION_CONTROL_SEND_ALGORITHM_SIMULATOR_H_ | 7 #ifndef NET_QUIC_CONGESTION_CONTROL_SEND_ALGORITHM_SIMULATOR_H_ |
8 #define NET_QUIC_CONGESTION_CONTROL_SEND_ALGORITHM_SIMULATOR_H_ | 8 #define NET_QUIC_CONGESTION_CONTROL_SEND_ALGORITHM_SIMULATOR_H_ |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 QuicByteCount bytes_in_flight; | 87 QuicByteCount bytes_in_flight; |
88 QuicTime start_time; | 88 QuicTime start_time; |
89 }; | 89 }; |
90 | 90 |
91 struct SentPacket { | 91 struct SentPacket { |
92 SentPacket() | 92 SentPacket() |
93 : sequence_number(0), | 93 : sequence_number(0), |
94 send_time(QuicTime::Zero()), | 94 send_time(QuicTime::Zero()), |
95 ack_time(QuicTime::Zero()), | 95 ack_time(QuicTime::Zero()), |
96 lost(false), | 96 lost(false), |
97 transfer(NULL) {} | 97 transfer(nullptr) {} |
98 SentPacket(QuicPacketSequenceNumber sequence_number, | 98 SentPacket(QuicPacketSequenceNumber sequence_number, |
99 QuicTime send_time, | 99 QuicTime send_time, |
100 QuicTime ack_time, | 100 QuicTime ack_time, |
101 bool lost, | 101 bool lost, |
102 Transfer* transfer) | 102 Transfer* transfer) |
103 : sequence_number(sequence_number), | 103 : sequence_number(sequence_number), |
104 send_time(send_time), | 104 send_time(send_time), |
105 ack_time(ack_time), | 105 ack_time(ack_time), |
106 lost(lost), | 106 lost(lost), |
107 transfer(transfer) {} | 107 transfer(transfer) {} |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 QuicTime::Delta rtt_; | 222 QuicTime::Delta rtt_; |
223 size_t buffer_size_; // In bytes. | 223 size_t buffer_size_; // In bytes. |
224 QuicTime::Delta delayed_ack_timer_; | 224 QuicTime::Delta delayed_ack_timer_; |
225 | 225 |
226 DISALLOW_COPY_AND_ASSIGN(SendAlgorithmSimulator); | 226 DISALLOW_COPY_AND_ASSIGN(SendAlgorithmSimulator); |
227 }; | 227 }; |
228 | 228 |
229 } // namespace net | 229 } // namespace net |
230 | 230 |
231 #endif // NET_QUIC_CONGESTION_CONTROL_SEND_ALGORITHM_SIMULATOR_H_ | 231 #endif // NET_QUIC_CONGESTION_CONTROL_SEND_ALGORITHM_SIMULATOR_H_ |
OLD | NEW |