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

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

Issue 1046523002: Cache the value of GetMaxPlaintextSize in QuicPacketCreator. No functional change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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_packet_creator_test.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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 // Called when the FEC alarm fires. 171 // Called when the FEC alarm fires.
172 void OnFecTimeout(); 172 void OnFecTimeout();
173 173
174 // Called after sending |sequence_number| to determine whether an FEC alarm 174 // Called after sending |sequence_number| to determine whether an FEC alarm
175 // should be set for sending out an FEC packet. Returns a positive and finite 175 // should be set for sending out an FEC packet. Returns a positive and finite
176 // timeout if an FEC alarm should be set, and infinite if no alarm should be 176 // timeout if an FEC alarm should be set, and infinite if no alarm should be
177 // set. OnFecTimeout should be called to send the FEC packet when the alarm 177 // set. OnFecTimeout should be called to send the FEC packet when the alarm
178 // fires. 178 // fires.
179 QuicTime::Delta GetFecTimeout(QuicPacketSequenceNumber sequence_number); 179 QuicTime::Delta GetFecTimeout(QuicPacketSequenceNumber sequence_number);
180 180
181 // Sets the encrypter to use for the encryption level.
182 void SetEncrypter(EncryptionLevel level, QuicEncrypter* encrypter);
183
181 // Sets the encryption level that will be applied to new packets. 184 // Sets the encryption level that will be applied to new packets.
182 void set_encryption_level(EncryptionLevel level); 185 void set_encryption_level(EncryptionLevel level);
183 186
184 // Sequence number of the last created packet, or 0 if no packets have been 187 // Sequence number of the last created packet, or 0 if no packets have been
185 // created. 188 // created.
186 QuicPacketSequenceNumber sequence_number() const; 189 QuicPacketSequenceNumber sequence_number() const;
187 190
188 QuicByteCount max_packet_length() const; 191 QuicByteCount max_packet_length() const;
189 192
190 void set_max_packet_length(QuicByteCount length); 193 void set_max_packet_length(QuicByteCount length);
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 264
262 // Stores notifiers that should be attached to the next serialized packet. 265 // Stores notifiers that should be attached to the next serialized packet.
263 std::list<QuicAckNotifier*> ack_notifiers_; 266 std::list<QuicAckNotifier*> ack_notifiers_;
264 267
265 DISALLOW_COPY_AND_ASSIGN(QuicPacketGenerator); 268 DISALLOW_COPY_AND_ASSIGN(QuicPacketGenerator);
266 }; 269 };
267 270
268 } // namespace net 271 } // namespace net
269 272
270 #endif // NET_QUIC_QUIC_PACKET_GENERATOR_H_ 273 #endif // NET_QUIC_QUIC_PACKET_GENERATOR_H_
OLDNEW
« no previous file with comments | « net/quic/quic_packet_creator_test.cc ('k') | net/quic/quic_packet_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698