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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 retransmittable_frames(retransmittable_frames), | 86 retransmittable_frames(retransmittable_frames), |
87 sequence_number_length(sequence_number_length) { | 87 sequence_number_length(sequence_number_length) { |
88 } | 88 } |
89 | 89 |
90 QuicPacketSequenceNumber sequence_number; | 90 QuicPacketSequenceNumber sequence_number; |
91 TransmissionType transmission_type; | 91 TransmissionType transmission_type; |
92 const RetransmittableFrames& retransmittable_frames; | 92 const RetransmittableFrames& retransmittable_frames; |
93 QuicSequenceNumberLength sequence_number_length; | 93 QuicSequenceNumberLength sequence_number_length; |
94 }; | 94 }; |
95 | 95 |
96 QuicSentPacketManager(bool is_server, | 96 QuicSentPacketManager(Perspective perspective, |
97 const QuicClock* clock, | 97 const QuicClock* clock, |
98 QuicConnectionStats* stats, | 98 QuicConnectionStats* stats, |
99 CongestionControlType congestion_control_type, | 99 CongestionControlType congestion_control_type, |
100 LossDetectionType loss_type, | 100 LossDetectionType loss_type, |
101 bool is_secure); | 101 bool is_secure); |
102 virtual ~QuicSentPacketManager(); | 102 virtual ~QuicSentPacketManager(); |
103 | 103 |
104 virtual void SetFromConfig(const QuicConfig& config); | 104 virtual void SetFromConfig(const QuicConfig& config); |
105 | 105 |
106 // Pass the CachedNetworkParameters to the send algorithm. | 106 // Pass the CachedNetworkParameters to the send algorithm. |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 // packet. The old packet's retransmittable frames entry will be nullptr, | 345 // packet. The old packet's retransmittable frames entry will be nullptr, |
346 // while the new packet's entry will contain the frames to retransmit. | 346 // while the new packet's entry will contain the frames to retransmit. |
347 // If the old packet is acked before the new packet, then the old entry will | 347 // If the old packet is acked before the new packet, then the old entry will |
348 // be removed from the map and the new entry's retransmittable frames will be | 348 // be removed from the map and the new entry's retransmittable frames will be |
349 // set to nullptr. | 349 // set to nullptr. |
350 QuicUnackedPacketMap unacked_packets_; | 350 QuicUnackedPacketMap unacked_packets_; |
351 | 351 |
352 // Pending retransmissions which have not been packetized and sent yet. | 352 // Pending retransmissions which have not been packetized and sent yet. |
353 PendingRetransmissionMap pending_retransmissions_; | 353 PendingRetransmissionMap pending_retransmissions_; |
354 | 354 |
355 // Tracks if the connection was created by the server. | 355 // Tracks if the connection was created by the server or the client. |
356 bool is_server_; | 356 Perspective perspective_; |
357 | 357 |
358 // An AckNotifier can register to be informed when ACKs have been received for | 358 // An AckNotifier can register to be informed when ACKs have been received for |
359 // all packets that a given block of data was sent in. The AckNotifierManager | 359 // all packets that a given block of data was sent in. The AckNotifierManager |
360 // maintains the currently active notifiers. | 360 // maintains the currently active notifiers. |
361 AckNotifierManager ack_notifier_manager_; | 361 AckNotifierManager ack_notifier_manager_; |
362 | 362 |
363 const QuicClock* clock_; | 363 const QuicClock* clock_; |
364 QuicConnectionStats* stats_; | 364 QuicConnectionStats* stats_; |
365 DebugDelegate* debug_delegate_; | 365 DebugDelegate* debug_delegate_; |
366 NetworkChangeVisitor* network_change_visitor_; | 366 NetworkChangeVisitor* network_change_visitor_; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 // Records bandwidth from server to client in normal operation, over periods | 407 // Records bandwidth from server to client in normal operation, over periods |
408 // of time with no loss events. | 408 // of time with no loss events. |
409 QuicSustainedBandwidthRecorder sustained_bandwidth_recorder_; | 409 QuicSustainedBandwidthRecorder sustained_bandwidth_recorder_; |
410 | 410 |
411 DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManager); | 411 DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManager); |
412 }; | 412 }; |
413 | 413 |
414 } // namespace net | 414 } // namespace net |
415 | 415 |
416 #endif // NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ | 416 #endif // NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ |
OLD | NEW |