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

Side by Side Diff: net/socket/transport_client_socket_pool.cc

Issue 2895633002: Fix comment about "happy eyeballs" IPv4 fallback (Closed)
Patch Set: Created 3 years, 7 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 | no next file » | 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/socket/transport_client_socket_pool.h" 5 #include "net/socket/transport_client_socket_pool.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher; 297 std::unique_ptr<SocketPerformanceWatcher> socket_performance_watcher;
298 if (socket_performance_watcher_factory_) { 298 if (socket_performance_watcher_factory_) {
299 socket_performance_watcher = 299 socket_performance_watcher =
300 socket_performance_watcher_factory_->CreateSocketPerformanceWatcher( 300 socket_performance_watcher_factory_->CreateSocketPerformanceWatcher(
301 SocketPerformanceWatcherFactory::PROTOCOL_TCP); 301 SocketPerformanceWatcherFactory::PROTOCOL_TCP);
302 } 302 }
303 transport_socket_ = client_socket_factory_->CreateTransportClientSocket( 303 transport_socket_ = client_socket_factory_->CreateTransportClientSocket(
304 addresses_, std::move(socket_performance_watcher), net_log().net_log(), 304 addresses_, std::move(socket_performance_watcher), net_log().net_log(),
305 net_log().source()); 305 net_log().source());
306 306
307 // If the list contains IPv6 and IPv4 addresses, the first address will 307 // If the list contains IPv6 and IPv4 addresses, and the first address
308 // be IPv6, and the IPv4 addresses will be tried as fallback addresses, 308 // is IPv6, the IPv4 addresses will be tried as fallback addresses, per
309 // per "Happy Eyeballs" (RFC 6555). 309 // "Happy Eyeballs" (RFC 6555).
310 bool try_ipv6_connect_with_ipv4_fallback = 310 bool try_ipv6_connect_with_ipv4_fallback =
311 addresses_.front().GetFamily() == ADDRESS_FAMILY_IPV6 && 311 addresses_.front().GetFamily() == ADDRESS_FAMILY_IPV6 &&
312 !AddressListOnlyContainsIPv6(addresses_); 312 !AddressListOnlyContainsIPv6(addresses_);
313 313
314 // Enable TCP FastOpen if indicated by transport socket params. 314 // Enable TCP FastOpen if indicated by transport socket params.
315 // Note: We currently do not turn on TCP FastOpen for destinations where 315 // Note: We currently do not turn on TCP FastOpen for destinations where
316 // we try a TCP connect over IPv6 with fallback to IPv4. 316 // we try a TCP connect over IPv6 with fallback to IPv4.
317 if (!try_ipv6_connect_with_ipv4_fallback && 317 if (!try_ipv6_connect_with_ipv4_fallback &&
318 params_->combine_connect_and_write() == 318 params_->combine_connect_and_write() ==
319 TransportSocketParams::COMBINE_CONNECT_AND_WRITE_DESIRED) { 319 TransportSocketParams::COMBINE_CONNECT_AND_WRITE_DESIRED) {
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 HigherLayeredPool* higher_pool) { 608 HigherLayeredPool* higher_pool) {
609 base_.AddHigherLayeredPool(higher_pool); 609 base_.AddHigherLayeredPool(higher_pool);
610 } 610 }
611 611
612 void TransportClientSocketPool::RemoveHigherLayeredPool( 612 void TransportClientSocketPool::RemoveHigherLayeredPool(
613 HigherLayeredPool* higher_pool) { 613 HigherLayeredPool* higher_pool) {
614 base_.RemoveHigherLayeredPool(higher_pool); 614 base_.RemoveHigherLayeredPool(higher_pool);
615 } 615 }
616 616
617 } // namespace net 617 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698