| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 bool HasUnackedPackets() const; | 171 bool HasUnackedPackets() const; |
| 172 | 172 |
| 173 // Returns the smallest packet number of a serialized packet which has not | 173 // Returns the smallest packet number of a serialized packet which has not |
| 174 // been acked by the peer. | 174 // been acked by the peer. |
| 175 QuicPacketNumber GetLeastUnacked() const; | 175 QuicPacketNumber GetLeastUnacked() const; |
| 176 | 176 |
| 177 // Called when we have sent bytes to the peer. This informs the manager both | 177 // Called when we have sent bytes to the peer. This informs the manager both |
| 178 // the number of bytes sent and if they were retransmitted. Returns true if | 178 // the number of bytes sent and if they were retransmitted. Returns true if |
| 179 // the sender should reset the retransmission timer. | 179 // the sender should reset the retransmission timer. |
| 180 virtual bool OnPacketSent(SerializedPacket* serialized_packet, | 180 virtual bool OnPacketSent(SerializedPacket* serialized_packet, |
| 181 QuicPathId /*original_path_id*/, |
| 181 QuicPacketNumber original_packet_number, | 182 QuicPacketNumber original_packet_number, |
| 182 QuicTime sent_time, | 183 QuicTime sent_time, |
| 183 TransmissionType transmission_type, | 184 TransmissionType transmission_type, |
| 184 HasRetransmittableData has_retransmittable_data); | 185 HasRetransmittableData has_retransmittable_data); |
| 185 | 186 |
| 186 // Called when the retransmission timer expires. | 187 // Called when the retransmission timer expires. |
| 187 virtual void OnRetransmissionTimeout(); | 188 virtual void OnRetransmissionTimeout(); |
| 188 | 189 |
| 189 // Calculate the time until we can send the next packet to the wire. | 190 // Calculate the time until we can send the next packet to the wire. |
| 190 // Note 1: When kUnknownWaitTime is returned, there is no need to poll | 191 // Note 1: When kUnknownWaitTime is returned, there is no need to poll |
| (...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 // Records bandwidth from server to client in normal operation, over periods | 452 // Records bandwidth from server to client in normal operation, over periods |
| 452 // of time with no loss events. | 453 // of time with no loss events. |
| 453 QuicSustainedBandwidthRecorder sustained_bandwidth_recorder_; | 454 QuicSustainedBandwidthRecorder sustained_bandwidth_recorder_; |
| 454 | 455 |
| 455 DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManager); | 456 DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManager); |
| 456 }; | 457 }; |
| 457 | 458 |
| 458 } // namespace net | 459 } // namespace net |
| 459 | 460 |
| 460 #endif // NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ | 461 #endif // NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ |
| OLD | NEW |