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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |