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

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

Issue 391383002: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merging with TOT Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_protocol.h ('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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // interesting points. Implementations must not mutate the state of 45 // interesting points. Implementations must not mutate the state of
46 // the packet manager or connection as a result of these callbacks. 46 // the packet manager or connection as a result of these callbacks.
47 class NET_EXPORT_PRIVATE DebugDelegate { 47 class NET_EXPORT_PRIVATE DebugDelegate {
48 public: 48 public:
49 virtual ~DebugDelegate() {} 49 virtual ~DebugDelegate() {}
50 50
51 // Called when a spurious retransmission is detected. 51 // Called when a spurious retransmission is detected.
52 virtual void OnSpuriousPacketRetransmition( 52 virtual void OnSpuriousPacketRetransmition(
53 TransmissionType transmission_type, 53 TransmissionType transmission_type,
54 QuicByteCount byte_size) {} 54 QuicByteCount byte_size) {}
55
56 virtual void OnSentPacket(
57 QuicPacketSequenceNumber sequence_number,
58 QuicTime sent_time,
59 QuicByteCount bytes) {}
60
61 virtual void OnRetransmittedPacket(
62 QuicPacketSequenceNumber old_sequence_number,
63 QuicPacketSequenceNumber new_sequence_number,
64 TransmissionType transmission_type,
65 QuicTime time) {}
66
67 virtual void OnIncomingAck(
68 const ReceivedPacketInfo& received_info,
69 QuicTime ack_receive_time,
70 QuicPacketSequenceNumber largest_observed,
71 bool largest_observed_acked,
72 QuicPacketSequenceNumber least_unacked_sent_packet) {}
55 }; 73 };
56 74
57 // Struct to store the pending retransmission information. 75 // Struct to store the pending retransmission information.
58 struct PendingRetransmission { 76 struct PendingRetransmission {
59 PendingRetransmission(QuicPacketSequenceNumber sequence_number, 77 PendingRetransmission(QuicPacketSequenceNumber sequence_number,
60 TransmissionType transmission_type, 78 TransmissionType transmission_type,
61 const RetransmittableFrames& retransmittable_frames, 79 const RetransmittableFrames& retransmittable_frames,
62 QuicSequenceNumberLength sequence_number_length) 80 QuicSequenceNumberLength sequence_number_length)
63 : sequence_number(sequence_number), 81 : sequence_number(sequence_number),
64 transmission_type(transmission_type), 82 transmission_type(transmission_type),
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 QuicBandwidth BandwidthEstimate() const; 184 QuicBandwidth BandwidthEstimate() const;
167 185
168 // Returns true if the current bandwidth estimate is reliable. 186 // Returns true if the current bandwidth estimate is reliable.
169 bool HasReliableBandwidthEstimate() const; 187 bool HasReliableBandwidthEstimate() const;
170 188
171 // Returns the size of the current congestion window in bytes. Note, this is 189 // Returns the size of the current congestion window in bytes. Note, this is
172 // not the *available* window. Some send algorithms may not use a congestion 190 // not the *available* window. Some send algorithms may not use a congestion
173 // window and will return 0. 191 // window and will return 0.
174 QuicByteCount GetCongestionWindow() const; 192 QuicByteCount GetCongestionWindow() const;
175 193
194 // Returns the size of the slow start congestion window in bytes,
195 // aka ssthresh. Some send algorithms do not define a slow start
196 // threshold and will return 0.
197 QuicByteCount GetSlowStartThreshold() const;
198
176 // Enables pacing if it has not already been enabled, and if 199 // Enables pacing if it has not already been enabled, and if
177 // FLAGS_enable_quic_pacing is set. 200 // FLAGS_enable_quic_pacing is set.
178 void MaybeEnablePacing(); 201 void MaybeEnablePacing();
179 202
180 bool using_pacing() const { return using_pacing_; } 203 bool using_pacing() const { return using_pacing_; }
181 204
182 void set_debug_delegate(DebugDelegate* debug_delegate) { 205 void set_debug_delegate(DebugDelegate* debug_delegate) {
183 debug_delegate_ = debug_delegate; 206 debug_delegate_ = debug_delegate;
184 } 207 }
185 208
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 // Sets of packets acked and lost as a result of the last congestion event. 342 // Sets of packets acked and lost as a result of the last congestion event.
320 SendAlgorithmInterface::CongestionMap packets_acked_; 343 SendAlgorithmInterface::CongestionMap packets_acked_;
321 SendAlgorithmInterface::CongestionMap packets_lost_; 344 SendAlgorithmInterface::CongestionMap packets_lost_;
322 345
323 DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManager); 346 DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManager);
324 }; 347 };
325 348
326 } // namespace net 349 } // namespace net
327 350
328 #endif // NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ 351 #endif // NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_
OLDNEW
« no previous file with comments | « net/quic/quic_protocol.h ('k') | net/quic/quic_sent_packet_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698