| OLD | NEW |
| 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 #ifndef NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ | 5 #ifndef NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ |
| 6 #define NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ | 6 #define NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 | 283 |
| 284 // Process the incoming ack looking for newly ack'd data packets. | 284 // Process the incoming ack looking for newly ack'd data packets. |
| 285 void HandleAckForSentPackets(const QuicAckFrame& ack_frame); | 285 void HandleAckForSentPackets(const QuicAckFrame& ack_frame); |
| 286 | 286 |
| 287 // Returns the current retransmission mode. | 287 // Returns the current retransmission mode. |
| 288 RetransmissionTimeoutMode GetRetransmissionMode() const; | 288 RetransmissionTimeoutMode GetRetransmissionMode() const; |
| 289 | 289 |
| 290 // Retransmits all crypto stream packets. | 290 // Retransmits all crypto stream packets. |
| 291 void RetransmitCryptoPackets(); | 291 void RetransmitCryptoPackets(); |
| 292 | 292 |
| 293 // Retransmits two packets for an RTO and removes any non-retransmittable |
| 294 // packets from flight. |
| 295 void RetransmitRtoPackets(); |
| 296 |
| 293 // Retransmits all the packets and abandons by invoking a full RTO. | 297 // Retransmits all the packets and abandons by invoking a full RTO. |
| 294 void RetransmitAllPackets(); | 298 void RetransmitAllPackets(); |
| 295 | 299 |
| 296 // Returns the timer for retransmitting crypto handshake packets. | 300 // Returns the timer for retransmitting crypto handshake packets. |
| 297 const QuicTime::Delta GetCryptoRetransmissionDelay() const; | 301 const QuicTime::Delta GetCryptoRetransmissionDelay() const; |
| 298 | 302 |
| 299 // Returns the timer for a new tail loss probe. | 303 // Returns the timer for a new tail loss probe. |
| 300 const QuicTime::Delta GetTailLossProbeDelay() const; | 304 const QuicTime::Delta GetTailLossProbeDelay() const; |
| 301 | 305 |
| 302 // Returns the retransmission timeout, after which a full RTO occurs. | 306 // Returns the retransmission timeout, after which a full RTO occurs. |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 | 390 |
| 387 // Tracks the first RTO packet. If any packet before that packet gets acked, | 391 // Tracks the first RTO packet. If any packet before that packet gets acked, |
| 388 // it indicates the RTO was spurious and should be reversed(F-RTO). | 392 // it indicates the RTO was spurious and should be reversed(F-RTO). |
| 389 QuicPacketSequenceNumber first_rto_transmission_; | 393 QuicPacketSequenceNumber first_rto_transmission_; |
| 390 // Number of times the RTO timer has fired in a row without receiving an ack. | 394 // Number of times the RTO timer has fired in a row without receiving an ack. |
| 391 size_t consecutive_rto_count_; | 395 size_t consecutive_rto_count_; |
| 392 // Number of times the tail loss probe has been sent. | 396 // Number of times the tail loss probe has been sent. |
| 393 size_t consecutive_tlp_count_; | 397 size_t consecutive_tlp_count_; |
| 394 // Number of times the crypto handshake has been retransmitted. | 398 // Number of times the crypto handshake has been retransmitted. |
| 395 size_t consecutive_crypto_retransmission_count_; | 399 size_t consecutive_crypto_retransmission_count_; |
| 396 // Number of pending transmissions of TLP or crypto packets. | 400 // Number of pending transmissions of TLP, RTO, or crypto packets. |
| 397 size_t pending_timer_transmission_count_; | 401 size_t pending_timer_transmission_count_; |
| 398 // Maximum number of tail loss probes to send before firing an RTO. | 402 // Maximum number of tail loss probes to send before firing an RTO. |
| 399 size_t max_tail_loss_probes_; | 403 size_t max_tail_loss_probes_; |
| 400 bool using_pacing_; | 404 bool using_pacing_; |
| 401 | 405 |
| 402 // Vectors packets acked and lost as a result of the last congestion event. | 406 // Vectors packets acked and lost as a result of the last congestion event. |
| 403 SendAlgorithmInterface::CongestionVector packets_acked_; | 407 SendAlgorithmInterface::CongestionVector packets_acked_; |
| 404 SendAlgorithmInterface::CongestionVector packets_lost_; | 408 SendAlgorithmInterface::CongestionVector packets_lost_; |
| 405 | 409 |
| 406 // Set to true after the crypto handshake has successfully completed. After | 410 // Set to true after the crypto handshake has successfully completed. After |
| 407 // this is true we no longer use HANDSHAKE_MODE, and further frames sent on | 411 // this is true we no longer use HANDSHAKE_MODE, and further frames sent on |
| 408 // the crypto stream (i.e. SCUP messages) are treated like normal | 412 // the crypto stream (i.e. SCUP messages) are treated like normal |
| 409 // retransmittable frames. | 413 // retransmittable frames. |
| 410 bool handshake_confirmed_; | 414 bool handshake_confirmed_; |
| 411 | 415 |
| 412 // Records bandwidth from server to client in normal operation, over periods | 416 // Records bandwidth from server to client in normal operation, over periods |
| 413 // of time with no loss events. | 417 // of time with no loss events. |
| 414 QuicSustainedBandwidthRecorder sustained_bandwidth_recorder_; | 418 QuicSustainedBandwidthRecorder sustained_bandwidth_recorder_; |
| 415 | 419 |
| 416 DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManager); | 420 DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManager); |
| 417 }; | 421 }; |
| 418 | 422 |
| 419 } // namespace net | 423 } // namespace net |
| 420 | 424 |
| 421 #endif // NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ | 425 #endif // NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ |
| OLD | NEW |