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

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

Issue 1777423002: Remove max_packet_length from QuicPacketGenerator, because it is no longer necessary with FEC gone.… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@116277228
Patch Set: Created 4 years, 9 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_connection.cc ('k') | net/quic/quic_packet_generator.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Responsible for generating packets on behalf of a QuicConnection. 5 // Responsible for generating packets on behalf of a QuicConnection.
6 // Packets are serialized just-in-time. Control frames are queued. 6 // Packets are serialized just-in-time. Control frames are queued.
7 // Ack and Feedback frames will be requested from the Connection 7 // Ack and Feedback frames will be requested from the Connection
8 // just-in-time. When a packet needs to be sent, the Generator 8 // just-in-time. When a packet needs to be sent, the Generator
9 // will serialize a packet and pass it to QuicConnection::SendOrQueuePacket() 9 // will serialize a packet and pass it to QuicConnection::SendOrQueuePacket()
10 // 10 //
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // Sets the encrypter to use for the encryption level. 141 // Sets the encrypter to use for the encryption level.
142 void SetEncrypter(EncryptionLevel level, QuicEncrypter* encrypter); 142 void SetEncrypter(EncryptionLevel level, QuicEncrypter* encrypter);
143 143
144 // Sets the encryption level that will be applied to new packets. 144 // Sets the encryption level that will be applied to new packets.
145 void set_encryption_level(EncryptionLevel level); 145 void set_encryption_level(EncryptionLevel level);
146 146
147 // packet number of the last created packet, or 0 if no packets have been 147 // packet number of the last created packet, or 0 if no packets have been
148 // created. 148 // created.
149 QuicPacketNumber packet_number() const; 149 QuicPacketNumber packet_number() const;
150 150
151 // Returns the maximum packet length. Note that this is the long-term maximum 151 // Returns the maximum length a current packet can actually have.
152 // packet length, and it may not be the maximum length of the current packet,
153 // if the generator is in the middle of the packet (in batch mode).
154 QuicByteCount GetMaxPacketLength() const;
155 // Returns the maximum length current packet can actually have.
156 QuicByteCount GetCurrentMaxPacketLength() const; 152 QuicByteCount GetCurrentMaxPacketLength() const;
157 153
158 // Set maximum packet length at the next opportunity. 154 // Set maximum packet length in the creator immediately. May not be called
155 // when there are frames queued in the creator.
159 void SetMaxPacketLength(QuicByteCount length); 156 void SetMaxPacketLength(QuicByteCount length);
160 157
161 // Sets |path_id| to be the path on which next packet is generated. 158 // Sets |path_id| to be the path on which next packet is generated.
162 void SetCurrentPath(QuicPathId path_id, 159 void SetCurrentPath(QuicPathId path_id,
163 QuicPacketNumber least_packet_awaited_by_peer, 160 QuicPacketNumber least_packet_awaited_by_peer,
164 QuicPacketCount max_packets_in_flight); 161 QuicPacketCount max_packets_in_flight);
165 162
166 void set_debug_delegate(QuicPacketCreator::DebugDelegate* debug_delegate) { 163 void set_debug_delegate(QuicPacketCreator::DebugDelegate* debug_delegate) {
167 packet_creator_.set_debug_delegate(debug_delegate); 164 packet_creator_.set_debug_delegate(debug_delegate);
168 } 165 }
(...skipping 25 matching lines...) Expand all
194 // Flags to indicate the need for just-in-time construction of a frame. 191 // Flags to indicate the need for just-in-time construction of a frame.
195 bool should_send_ack_; 192 bool should_send_ack_;
196 bool should_send_stop_waiting_; 193 bool should_send_stop_waiting_;
197 // If we put a non-retransmittable frame in this packet, then we have to hold 194 // If we put a non-retransmittable frame in this packet, then we have to hold
198 // a reference to it until we flush (and serialize it). Retransmittable frames 195 // a reference to it until we flush (and serialize it). Retransmittable frames
199 // are referenced elsewhere so that they can later be (optionally) 196 // are referenced elsewhere so that they can later be (optionally)
200 // retransmitted. 197 // retransmitted.
201 QuicAckFrame pending_ack_frame_; 198 QuicAckFrame pending_ack_frame_;
202 QuicStopWaitingFrame pending_stop_waiting_frame_; 199 QuicStopWaitingFrame pending_stop_waiting_frame_;
203 200
204 // Stores the maximum packet size we are allowed to send. This might not be
205 // the maximum size we are actually using now, if we are in the middle of the
206 // packet.
207 QuicByteCount max_packet_length_;
208
209 DISALLOW_COPY_AND_ASSIGN(QuicPacketGenerator); 201 DISALLOW_COPY_AND_ASSIGN(QuicPacketGenerator);
210 }; 202 };
211 203
212 } // namespace net 204 } // namespace net
213 205
214 #endif // NET_QUIC_QUIC_PACKET_GENERATOR_H_ 206 #endif // NET_QUIC_QUIC_PACKET_GENERATOR_H_
OLDNEW
« no previous file with comments | « net/quic/quic_connection.cc ('k') | net/quic/quic_packet_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698