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

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

Issue 2183493002: Add a merely pass-through QuicMultipathSentPacketManager. Protected behind blocked flag FLAGS_quic_… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 largest_received_packet_size_(0), 311 largest_received_packet_size_(0),
312 goaway_sent_(false), 312 goaway_sent_(false),
313 goaway_received_(false), 313 goaway_received_(false),
314 multipath_enabled_(false) { 314 multipath_enabled_(false) {
315 DVLOG(1) << ENDPOINT 315 DVLOG(1) << ENDPOINT
316 << "Created connection with connection_id: " << connection_id; 316 << "Created connection with connection_id: " << connection_id;
317 framer_.set_visitor(this); 317 framer_.set_visitor(this);
318 framer_.set_received_entropy_calculator(&received_packet_manager_); 318 framer_.set_received_entropy_calculator(&received_packet_manager_);
319 last_stop_waiting_frame_.least_unacked = 0; 319 last_stop_waiting_frame_.least_unacked = 0;
320 stats_.connection_creation_time = clock_->ApproximateNow(); 320 stats_.connection_creation_time = clock_->ApproximateNow();
321 if (FLAGS_quic_enable_multipath) {
322 sent_packet_manager_.reset(new QuicMultipathSentPacketManager(
323 sent_packet_manager_.release(), this));
324 }
321 // TODO(ianswett): Supply the NetworkChangeVisitor as a constructor argument 325 // TODO(ianswett): Supply the NetworkChangeVisitor as a constructor argument
322 // and make it required non-null, because it's always used. 326 // and make it required non-null, because it's always used.
323 sent_packet_manager_->SetNetworkChangeVisitor(this); 327 sent_packet_manager_->SetNetworkChangeVisitor(this);
324 // Allow the packet writer to potentially reduce the packet size to a value 328 // Allow the packet writer to potentially reduce the packet size to a value
325 // even smaller than kDefaultMaxPacketSize. 329 // even smaller than kDefaultMaxPacketSize.
326 SetMaxPacketLength(perspective_ == Perspective::IS_SERVER 330 SetMaxPacketLength(perspective_ == Perspective::IS_SERVER
327 ? kDefaultServerMaxPacketSize 331 ? kDefaultServerMaxPacketSize
328 : kDefaultMaxPacketSize); 332 : kDefaultMaxPacketSize);
329 received_packet_manager_.SetVersion(version()); 333 received_packet_manager_.SetVersion(version());
330 } 334 }
(...skipping 2178 matching lines...) Expand 10 before | Expand all | Expand 10 after
2509 // the sender and a signaling mechanism -- if the sender uses a 2513 // the sender and a signaling mechanism -- if the sender uses a
2510 // different MinRTO, we may get spurious retransmissions. May not have 2514 // different MinRTO, we may get spurious retransmissions. May not have
2511 // any benefits, but if the delayed ack becomes a significant source 2515 // any benefits, but if the delayed ack becomes a significant source
2512 // of (likely, tail) latency, then consider such a mechanism. 2516 // of (likely, tail) latency, then consider such a mechanism.
2513 const QuicTime::Delta QuicConnection::DelayedAckTime() { 2517 const QuicTime::Delta QuicConnection::DelayedAckTime() {
2514 return QuicTime::Delta::FromMilliseconds( 2518 return QuicTime::Delta::FromMilliseconds(
2515 min(kMaxDelayedAckTimeMs, kMinRetransmissionTimeMs / 2)); 2519 min(kMaxDelayedAckTimeMs, kMinRetransmissionTimeMs / 2));
2516 } 2520 }
2517 2521
2518 } // namespace net 2522 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698