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

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

Issue 493183002: Move least_packet_awaited_by_peer_ from QuicReceivedPacketManager to (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Remove_timestamp_receiver_73627146
Patch Set: Created 6 years, 4 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 <deque> 8 #include <deque>
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 bool using_pacing() const { return using_pacing_; } 219 bool using_pacing() const { return using_pacing_; }
220 220
221 void set_debug_delegate(DebugDelegate* debug_delegate) { 221 void set_debug_delegate(DebugDelegate* debug_delegate) {
222 debug_delegate_ = debug_delegate; 222 debug_delegate_ = debug_delegate;
223 } 223 }
224 224
225 QuicPacketSequenceNumber largest_observed() const { 225 QuicPacketSequenceNumber largest_observed() const {
226 return largest_observed_; 226 return largest_observed_;
227 } 227 }
228 228
229 QuicPacketSequenceNumber least_packet_awaited_by_peer() {
230 return least_packet_awaited_by_peer_;
231 }
232
229 void set_network_change_visitor(NetworkChangeVisitor* visitor) { 233 void set_network_change_visitor(NetworkChangeVisitor* visitor) {
230 DCHECK(!network_change_visitor_); 234 DCHECK(!network_change_visitor_);
231 DCHECK(visitor); 235 DCHECK(visitor);
232 network_change_visitor_ = visitor; 236 network_change_visitor_ = visitor;
233 } 237 }
234 238
235 size_t consecutive_rto_count() const { 239 size_t consecutive_rto_count() const {
236 return consecutive_rto_count_; 240 return consecutive_rto_count_;
237 } 241 }
238 242
(...skipping 15 matching lines...) Expand all
254 // Retransmission of handshake packets prior to handshake completion. 258 // Retransmission of handshake packets prior to handshake completion.
255 HANDSHAKE_MODE, 259 HANDSHAKE_MODE,
256 // Re-invoke the loss detection when a packet is not acked before the 260 // Re-invoke the loss detection when a packet is not acked before the
257 // loss detection algorithm expects. 261 // loss detection algorithm expects.
258 LOSS_MODE, 262 LOSS_MODE,
259 }; 263 };
260 264
261 typedef linked_hash_map<QuicPacketSequenceNumber, 265 typedef linked_hash_map<QuicPacketSequenceNumber,
262 TransmissionType> PendingRetransmissionMap; 266 TransmissionType> PendingRetransmissionMap;
263 267
268 // Updates the least_packet_awaited_by_peer.
269 void UpdatePacketInformationReceivedByPeer(const QuicAckFrame& ack_frame);
270
264 // Process the incoming ack looking for newly ack'd data packets. 271 // Process the incoming ack looking for newly ack'd data packets.
265 void HandleAckForSentPackets(const QuicAckFrame& ack_frame); 272 void HandleAckForSentPackets(const QuicAckFrame& ack_frame);
266 273
267 // Returns the current retransmission mode. 274 // Returns the current retransmission mode.
268 RetransmissionTimeoutMode GetRetransmissionMode() const; 275 RetransmissionTimeoutMode GetRetransmissionMode() const;
269 276
270 // Retransmits all crypto stream packets. 277 // Retransmits all crypto stream packets.
271 void RetransmitCryptoPackets(); 278 void RetransmitCryptoPackets();
272 279
273 // Retransmits all the packets and abandons by invoking a full RTO. 280 // Retransmits all the packets and abandons by invoking a full RTO.
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 DebugDelegate* debug_delegate_; 355 DebugDelegate* debug_delegate_;
349 NetworkChangeVisitor* network_change_visitor_; 356 NetworkChangeVisitor* network_change_visitor_;
350 RttStats rtt_stats_; 357 RttStats rtt_stats_;
351 scoped_ptr<SendAlgorithmInterface> send_algorithm_; 358 scoped_ptr<SendAlgorithmInterface> send_algorithm_;
352 scoped_ptr<LossDetectionInterface> loss_algorithm_; 359 scoped_ptr<LossDetectionInterface> loss_algorithm_;
353 360
354 // The largest sequence number which we have sent and received an ACK for 361 // The largest sequence number which we have sent and received an ACK for
355 // from the peer. 362 // from the peer.
356 QuicPacketSequenceNumber largest_observed_; 363 QuicPacketSequenceNumber largest_observed_;
357 364
365 // Least sequence number which the peer is still waiting for.
366 QuicPacketSequenceNumber least_packet_awaited_by_peer_;
367
358 // Tracks the first RTO packet. If any packet before that packet gets acked, 368 // Tracks the first RTO packet. If any packet before that packet gets acked,
359 // it indicates the RTO was spurious and should be reversed(F-RTO). 369 // it indicates the RTO was spurious and should be reversed(F-RTO).
360 QuicPacketSequenceNumber first_rto_transmission_; 370 QuicPacketSequenceNumber first_rto_transmission_;
361 // Number of times the RTO timer has fired in a row without receiving an ack. 371 // Number of times the RTO timer has fired in a row without receiving an ack.
362 size_t consecutive_rto_count_; 372 size_t consecutive_rto_count_;
363 // Number of times the tail loss probe has been sent. 373 // Number of times the tail loss probe has been sent.
364 size_t consecutive_tlp_count_; 374 size_t consecutive_tlp_count_;
365 // Number of times the crypto handshake has been retransmitted. 375 // Number of times the crypto handshake has been retransmitted.
366 size_t consecutive_crypto_retransmission_count_; 376 size_t consecutive_crypto_retransmission_count_;
367 // Number of pending transmissions of TLP or crypto packets. 377 // Number of pending transmissions of TLP or crypto packets.
(...skipping 15 matching lines...) Expand all
383 // Records bandwidth from server to client in normal operation, over periods 393 // Records bandwidth from server to client in normal operation, over periods
384 // of time with no loss events. 394 // of time with no loss events.
385 QuicSustainedBandwidthRecorder sustained_bandwidth_recorder_; 395 QuicSustainedBandwidthRecorder sustained_bandwidth_recorder_;
386 396
387 DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManager); 397 DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManager);
388 }; 398 };
389 399
390 } // namespace net 400 } // namespace net
391 401
392 #endif // NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ 402 #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