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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 | 151 |
152 // Returns true if there are pending retransmissions. | 152 // Returns true if there are pending retransmissions. |
153 bool HasPendingRetransmissions() const; | 153 bool HasPendingRetransmissions() const; |
154 | 154 |
155 // Retrieves the next pending retransmission. | 155 // Retrieves the next pending retransmission. |
156 PendingRetransmission NextPendingRetransmission(); | 156 PendingRetransmission NextPendingRetransmission(); |
157 | 157 |
158 bool HasUnackedPackets() const; | 158 bool HasUnackedPackets() const; |
159 | 159 |
160 // Returns the smallest sequence number of a serialized packet which has not | 160 // Returns the smallest sequence number of a serialized packet which has not |
161 // been acked by the peer. If there are no unacked packets, returns 0. | 161 // been acked by the peer. |
162 QuicPacketSequenceNumber GetLeastUnackedSentPacket() const; | 162 QuicPacketSequenceNumber GetLeastUnacked() const; |
163 | 163 |
164 // Called when a congestion feedback frame is received from peer. | 164 // Called when a congestion feedback frame is received from peer. |
165 virtual void OnIncomingQuicCongestionFeedbackFrame( | 165 virtual void OnIncomingQuicCongestionFeedbackFrame( |
166 const QuicCongestionFeedbackFrame& frame, | 166 const QuicCongestionFeedbackFrame& frame, |
167 const QuicTime& feedback_receive_time); | 167 const QuicTime& feedback_receive_time); |
168 | 168 |
169 // Called when we have sent bytes to the peer. This informs the manager both | 169 // Called when we have sent bytes to the peer. This informs the manager both |
170 // the number of bytes sent and if they were retransmitted. Returns true if | 170 // the number of bytes sent and if they were retransmitted. Returns true if |
171 // the sender should reset the retransmission timer. | 171 // the sender should reset the retransmission timer. |
172 virtual bool OnPacketSent(QuicPacketSequenceNumber sequence_number, | 172 virtual bool OnPacketSent(QuicPacketSequenceNumber sequence_number, |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 // Number of times the tail loss probe has been sent. | 370 // Number of times the tail loss probe has been sent. |
371 size_t consecutive_tlp_count_; | 371 size_t consecutive_tlp_count_; |
372 // Number of times the crypto handshake has been retransmitted. | 372 // Number of times the crypto handshake has been retransmitted. |
373 size_t consecutive_crypto_retransmission_count_; | 373 size_t consecutive_crypto_retransmission_count_; |
374 // Number of pending transmissions of TLP or crypto packets. | 374 // Number of pending transmissions of TLP or crypto packets. |
375 size_t pending_timer_transmission_count_; | 375 size_t pending_timer_transmission_count_; |
376 // Maximum number of tail loss probes to send before firing an RTO. | 376 // Maximum number of tail loss probes to send before firing an RTO. |
377 size_t max_tail_loss_probes_; | 377 size_t max_tail_loss_probes_; |
378 bool using_pacing_; | 378 bool using_pacing_; |
379 | 379 |
380 // Sets of packets acked and lost as a result of the last congestion event. | 380 // Vectors packets acked and lost as a result of the last congestion event. |
381 SendAlgorithmInterface::CongestionMap packets_acked_; | 381 SendAlgorithmInterface::CongestionVector packets_acked_; |
382 SendAlgorithmInterface::CongestionMap packets_lost_; | 382 SendAlgorithmInterface::CongestionVector packets_lost_; |
383 | 383 |
384 // Set to true after the crypto handshake has successfully completed. After | 384 // Set to true after the crypto handshake has successfully completed. After |
385 // this is true we no longer use HANDSHAKE_MODE, and further frames sent on | 385 // this is true we no longer use HANDSHAKE_MODE, and further frames sent on |
386 // the crypto stream (i.e. SCUP messages) are treated like normal | 386 // the crypto stream (i.e. SCUP messages) are treated like normal |
387 // retransmittable frames. | 387 // retransmittable frames. |
388 bool handshake_confirmed_; | 388 bool handshake_confirmed_; |
389 | 389 |
390 // Records bandwidth from server to client in normal operation, over periods | 390 // Records bandwidth from server to client in normal operation, over periods |
391 // of time with no loss events. | 391 // of time with no loss events. |
392 QuicSustainedBandwidthRecorder sustained_bandwidth_recorder_; | 392 QuicSustainedBandwidthRecorder sustained_bandwidth_recorder_; |
393 | 393 |
394 DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManager); | 394 DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManager); |
395 }; | 395 }; |
396 | 396 |
397 } // namespace net | 397 } // namespace net |
398 | 398 |
399 #endif // NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ | 399 #endif // NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ |
OLD | NEW |