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

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

Issue 398873003: Adds dynamic setting of FEC group size based on the connection's current (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | « 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 #include <algorithm> 9 #include <algorithm>
10 #include <iterator> 10 #include <iterator>
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 if (!is_server_) { 239 if (!is_server_) {
240 // Pacing will be enabled if the client negotiates it. 240 // Pacing will be enabled if the client negotiates it.
241 sent_packet_manager_.MaybeEnablePacing(); 241 sent_packet_manager_.MaybeEnablePacing();
242 } 242 }
243 DVLOG(1) << ENDPOINT << "Created connection with connection_id: " 243 DVLOG(1) << ENDPOINT << "Created connection with connection_id: "
244 << connection_id; 244 << connection_id;
245 timeout_alarm_->Set(clock_->ApproximateNow().Add(idle_network_timeout_)); 245 timeout_alarm_->Set(clock_->ApproximateNow().Add(idle_network_timeout_));
246 framer_.set_visitor(this); 246 framer_.set_visitor(this);
247 framer_.set_received_entropy_calculator(&received_packet_manager_); 247 framer_.set_received_entropy_calculator(&received_packet_manager_);
248 stats_.connection_creation_time = clock_->ApproximateNow(); 248 stats_.connection_creation_time = clock_->ApproximateNow();
249 sent_packet_manager_.set_network_change_visitor(&packet_generator_);
249 } 250 }
250 251
251 QuicConnection::~QuicConnection() { 252 QuicConnection::~QuicConnection() {
252 STLDeleteElements(&undecryptable_packets_); 253 STLDeleteElements(&undecryptable_packets_);
253 STLDeleteValues(&group_map_); 254 STLDeleteValues(&group_map_);
254 for (QueuedPacketList::iterator it = queued_packets_.begin(); 255 for (QueuedPacketList::iterator it = queued_packets_.begin();
255 it != queued_packets_.end(); ++it) { 256 it != queued_packets_.end(); ++it) {
256 delete it->packet; 257 delete it->packet;
257 } 258 }
258 } 259 }
(...skipping 1719 matching lines...) Expand 10 before | Expand all | Expand 10 after
1978 // If we changed the generator's batch state, restore original batch state. 1979 // If we changed the generator's batch state, restore original batch state.
1979 if (!already_in_batch_mode_) { 1980 if (!already_in_batch_mode_) {
1980 DVLOG(1) << "Leaving Batch Mode."; 1981 DVLOG(1) << "Leaving Batch Mode.";
1981 connection_->packet_generator_.FinishBatchOperations(); 1982 connection_->packet_generator_.FinishBatchOperations();
1982 } 1983 }
1983 DCHECK_EQ(already_in_batch_mode_, 1984 DCHECK_EQ(already_in_batch_mode_,
1984 connection_->packet_generator_.InBatchMode()); 1985 connection_->packet_generator_.InBatchMode());
1985 } 1986 }
1986 1987
1987 } // namespace net 1988 } // 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