| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Accumulates frames for the next packet until more frames no longer fit or | 5 // Accumulates frames for the next packet until more frames no longer fit or |
| 6 // it's time to create a packet from them. Also provides packet creation of | 6 // it's time to create a packet from them. Also provides packet creation of |
| 7 // FEC packets based on previously created packets. If multipath enabled, only | 7 // FEC packets based on previously created packets. If multipath enabled, only |
| 8 // creates packets on one path at the same time. Currently, next packet number | 8 // creates packets on one path at the same time. Currently, next packet number |
| 9 // is tracked per-path. | 9 // is tracked per-path. |
| 10 | 10 |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 | 262 |
| 263 void set_fec_send_policy(FecSendPolicy fec_send_policy) { | 263 void set_fec_send_policy(FecSendPolicy fec_send_policy) { |
| 264 fec_send_policy_ = fec_send_policy; | 264 fec_send_policy_ = fec_send_policy; |
| 265 } | 265 } |
| 266 | 266 |
| 267 void set_rtt_multiplier_for_fec_timeout( | 267 void set_rtt_multiplier_for_fec_timeout( |
| 268 float rtt_multiplier_for_fec_timeout) { | 268 float rtt_multiplier_for_fec_timeout) { |
| 269 rtt_multiplier_for_fec_timeout_ = rtt_multiplier_for_fec_timeout; | 269 rtt_multiplier_for_fec_timeout_ = rtt_multiplier_for_fec_timeout; |
| 270 } | 270 } |
| 271 | 271 |
| 272 bool should_fec_protect_next_packet() { | |
| 273 return should_fec_protect_next_packet_; | |
| 274 } | |
| 275 | |
| 276 void set_should_fec_protect_next_packet(bool should_fec_protect_next_packet) { | |
| 277 should_fec_protect_next_packet_ = should_fec_protect_next_packet; | |
| 278 } | |
| 279 | |
| 280 void set_debug_delegate(DebugDelegate* debug_delegate) { | 272 void set_debug_delegate(DebugDelegate* debug_delegate) { |
| 281 debug_delegate_ = debug_delegate; | 273 debug_delegate_ = debug_delegate; |
| 282 } | 274 } |
| 283 | 275 |
| 284 private: | 276 private: |
| 285 friend class test::QuicPacketCreatorPeer; | 277 friend class test::QuicPacketCreatorPeer; |
| 286 | 278 |
| 287 static bool ShouldRetransmit(const QuicFrame& frame); | 279 static bool ShouldRetransmit(const QuicFrame& frame); |
| 288 | 280 |
| 289 // Converts a raw payload to a frame which fits into the current open | 281 // Converts a raw payload to a frame which fits into the current open |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 // The multiplication factor for FEC timeout based on RTT. | 425 // The multiplication factor for FEC timeout based on RTT. |
| 434 // TODO(rtenneti): Delete this code after the 0.25 RTT FEC experiment. | 426 // TODO(rtenneti): Delete this code after the 0.25 RTT FEC experiment. |
| 435 float rtt_multiplier_for_fec_timeout_; | 427 float rtt_multiplier_for_fec_timeout_; |
| 436 | 428 |
| 437 DISALLOW_COPY_AND_ASSIGN(QuicPacketCreator); | 429 DISALLOW_COPY_AND_ASSIGN(QuicPacketCreator); |
| 438 }; | 430 }; |
| 439 | 431 |
| 440 } // namespace net | 432 } // namespace net |
| 441 | 433 |
| 442 #endif // NET_QUIC_QUIC_PACKET_CREATOR_H_ | 434 #endif // NET_QUIC_QUIC_PACKET_CREATOR_H_ |
| OLD | NEW |