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

Side by Side Diff: net/quic/quic_connection.cc

Issue 916143004: Change the initial maximum packet size for a QUIC server to 1000 bytes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Adding_DCHECKS_in_crypto_stream_86300482
Patch Set: Created 5 years, 10 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 | « no previous file | net/quic/quic_connection_test.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 #include "net/quic/quic_connection.h" 5 #include "net/quic/quic_connection.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 #include <sys/types.h> 8 #include <sys/types.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 self_ip_changed_(false), 265 self_ip_changed_(false),
266 self_port_changed_(false), 266 self_port_changed_(false),
267 can_truncate_connection_ids_(true), 267 can_truncate_connection_ids_(true),
268 is_secure_(is_secure) { 268 is_secure_(is_secure) {
269 DVLOG(1) << ENDPOINT << "Created connection with connection_id: " 269 DVLOG(1) << ENDPOINT << "Created connection with connection_id: "
270 << connection_id; 270 << connection_id;
271 framer_.set_visitor(this); 271 framer_.set_visitor(this);
272 framer_.set_received_entropy_calculator(&received_packet_manager_); 272 framer_.set_received_entropy_calculator(&received_packet_manager_);
273 stats_.connection_creation_time = clock_->ApproximateNow(); 273 stats_.connection_creation_time = clock_->ApproximateNow();
274 sent_packet_manager_.set_network_change_visitor(this); 274 sent_packet_manager_.set_network_change_visitor(this);
275 if (FLAGS_quic_small_default_packet_size && is_server_) {
276 set_max_packet_length(kDefaultServerMaxPacketSize);
277 }
275 } 278 }
276 279
277 QuicConnection::~QuicConnection() { 280 QuicConnection::~QuicConnection() {
278 if (owns_writer_) { 281 if (owns_writer_) {
279 delete writer_; 282 delete writer_;
280 } 283 }
281 STLDeleteElements(&undecryptable_packets_); 284 STLDeleteElements(&undecryptable_packets_);
282 STLDeleteValues(&group_map_); 285 STLDeleteValues(&group_map_);
283 for (QueuedPacketList::iterator it = queued_packets_.begin(); 286 for (QueuedPacketList::iterator it = queued_packets_.begin();
284 it != queued_packets_.end(); ++it) { 287 it != queued_packets_.end(); ++it) {
(...skipping 1811 matching lines...) Expand 10 before | Expand all | Expand 10 after
2096 } 2099 }
2097 for (const QuicFrame& frame : retransmittable_frames->frames()) { 2100 for (const QuicFrame& frame : retransmittable_frames->frames()) {
2098 if (frame.type == CONNECTION_CLOSE_FRAME) { 2101 if (frame.type == CONNECTION_CLOSE_FRAME) {
2099 return true; 2102 return true;
2100 } 2103 }
2101 } 2104 }
2102 return false; 2105 return false;
2103 } 2106 }
2104 2107
2105 } // namespace net 2108 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698