Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Side by Side Diff: net/quic/quic_sent_packet_manager.h

Issue 1541263002: Landing Recent QUIC changes until 12/18/2015 13:57 UTC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: replace -1 with 0xff for InvalidPathId Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/quic_received_packet_manager.cc ('k') | net/quic/quic_sent_packet_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // Called when congestion window may have changed. 70 // Called when congestion window may have changed.
71 virtual void OnCongestionWindowChange() = 0; 71 virtual void OnCongestionWindowChange() = 0;
72 72
73 // Called when RTT may have changed, including when an RTT is read from 73 // Called when RTT may have changed, including when an RTT is read from
74 // the config. 74 // the config.
75 virtual void OnRttChange() = 0; 75 virtual void OnRttChange() = 0;
76 }; 76 };
77 77
78 // Struct to store the pending retransmission information. 78 // Struct to store the pending retransmission information.
79 struct PendingRetransmission { 79 struct PendingRetransmission {
80 PendingRetransmission(QuicPacketNumber packet_number, 80 PendingRetransmission(QuicPathId path_id,
81 QuicPacketNumber packet_number,
81 TransmissionType transmission_type, 82 TransmissionType transmission_type,
82 const RetransmittableFrames& retransmittable_frames, 83 const RetransmittableFrames& retransmittable_frames,
83 EncryptionLevel encryption_level, 84 EncryptionLevel encryption_level,
84 QuicPacketNumberLength packet_number_length) 85 QuicPacketNumberLength packet_number_length)
85 : packet_number(packet_number), 86 : path_id(path_id),
87 packet_number(packet_number),
86 transmission_type(transmission_type), 88 transmission_type(transmission_type),
87 retransmittable_frames(retransmittable_frames), 89 retransmittable_frames(retransmittable_frames),
88 encryption_level(encryption_level), 90 encryption_level(encryption_level),
89 packet_number_length(packet_number_length) {} 91 packet_number_length(packet_number_length) {}
90 92
93 QuicPathId path_id;
91 QuicPacketNumber packet_number; 94 QuicPacketNumber packet_number;
92 TransmissionType transmission_type; 95 TransmissionType transmission_type;
93 const RetransmittableFrames& retransmittable_frames; 96 const RetransmittableFrames& retransmittable_frames;
94 EncryptionLevel encryption_level; 97 EncryptionLevel encryption_level;
95 QuicPacketNumberLength packet_number_length; 98 QuicPacketNumberLength packet_number_length;
96 }; 99 };
97 100
98 QuicSentPacketManager(Perspective perspective, 101 QuicSentPacketManager(Perspective perspective,
102 QuicPathId path_id,
99 const QuicClock* clock, 103 const QuicClock* clock,
100 QuicConnectionStats* stats, 104 QuicConnectionStats* stats,
101 CongestionControlType congestion_control_type, 105 CongestionControlType congestion_control_type,
102 LossDetectionType loss_type); 106 LossDetectionType loss_type);
103 virtual ~QuicSentPacketManager(); 107 virtual ~QuicSentPacketManager();
104 108
105 virtual void SetFromConfig(const QuicConfig& config); 109 virtual void SetFromConfig(const QuicConfig& config);
106 110
107 // Pass the CachedNetworkParameters to the send algorithm. 111 // Pass the CachedNetworkParameters to the send algorithm.
108 void ResumeConnectionState( 112 void ResumeConnectionState(
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 // be removed from the map and the new entry's retransmittable frames will be 353 // be removed from the map and the new entry's retransmittable frames will be
350 // set to nullptr. 354 // set to nullptr.
351 QuicUnackedPacketMap unacked_packets_; 355 QuicUnackedPacketMap unacked_packets_;
352 356
353 // Pending retransmissions which have not been packetized and sent yet. 357 // Pending retransmissions which have not been packetized and sent yet.
354 PendingRetransmissionMap pending_retransmissions_; 358 PendingRetransmissionMap pending_retransmissions_;
355 359
356 // Tracks if the connection was created by the server or the client. 360 // Tracks if the connection was created by the server or the client.
357 Perspective perspective_; 361 Perspective perspective_;
358 362
363 QuicPathId path_id_;
364
359 const QuicClock* clock_; 365 const QuicClock* clock_;
360 QuicConnectionStats* stats_; 366 QuicConnectionStats* stats_;
361 DebugDelegate* debug_delegate_; 367 DebugDelegate* debug_delegate_;
362 NetworkChangeVisitor* network_change_visitor_; 368 NetworkChangeVisitor* network_change_visitor_;
363 const QuicPacketCount initial_congestion_window_; 369 const QuicPacketCount initial_congestion_window_;
364 RttStats rtt_stats_; 370 RttStats rtt_stats_;
365 scoped_ptr<SendAlgorithmInterface> send_algorithm_; 371 scoped_ptr<SendAlgorithmInterface> send_algorithm_;
366 scoped_ptr<LossDetectionInterface> loss_algorithm_; 372 scoped_ptr<LossDetectionInterface> loss_algorithm_;
367 bool n_connection_simulation_; 373 bool n_connection_simulation_;
368 374
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 // Records bandwidth from server to client in normal operation, over periods 414 // Records bandwidth from server to client in normal operation, over periods
409 // of time with no loss events. 415 // of time with no loss events.
410 QuicSustainedBandwidthRecorder sustained_bandwidth_recorder_; 416 QuicSustainedBandwidthRecorder sustained_bandwidth_recorder_;
411 417
412 DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManager); 418 DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManager);
413 }; 419 };
414 420
415 } // namespace net 421 } // namespace net
416 422
417 #endif // NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ 423 #endif // NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_
OLDNEW
« no previous file with comments | « net/quic/quic_received_packet_manager.cc ('k') | net/quic/quic_sent_packet_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698