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

Unified Diff: net/socket/transport_client_socket_pool.cc

Issue 451383002: Plumbing for TCP FastOpen for SSL sockets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« net/socket/tcp_socket.cc ('K') | « net/socket/transport_client_socket_pool.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/transport_client_socket_pool.cc
diff --git a/net/socket/transport_client_socket_pool.cc b/net/socket/transport_client_socket_pool.cc
index cf247c032706793693d28b4ee8ba91848d140bff..11095ecc3cbb55fe8b2ef88858c7068305c3017c 100644
--- a/net/socket/transport_client_socket_pool.cc
+++ b/net/socket/transport_client_socket_pool.cc
@@ -194,7 +194,8 @@ TransportConnectJob::TransportConnectJob(
: ConnectJob(group_name, timeout_duration, priority, delegate,
BoundNetLog::Make(net_log, NetLog::SOURCE_CONNECT_JOB)),
helper_(params, client_socket_factory, host_resolver, &connect_timing_),
- interval_between_connects_(CONNECT_INTERVAL_GT_20MS) {
+ interval_between_connects_(CONNECT_INTERVAL_GT_20MS),
+ group_name_(group_name) {
Randy Smith (Not in Mondays) 2014/08/11 19:07:01 Make sure to get the socket pool changes reviewed
helper_.SetOnIOComplete(this);
}
@@ -261,6 +262,15 @@ int TransportConnectJob::DoTransportConnect() {
transport_socket_ =
helper_.client_socket_factory()->CreateTransportClientSocket(
helper_.addresses(), net_log().net_log(), net_log().source());
+
+ // Enable TCP FastOpen if SSL socket. (This is a quite a hackish
+ // approach, but using TFO requires a more substantial change in the
+ // socket create/connect path.)
+ // TODO (jri): Finch trial this.
+ if (group_name_.substr(0, 3) == "ssl") {
Adam Rice 2014/08/11 05:33:38 Should this also be enabled for pm/ssl sockets? I
+ transport_socket_->EnableTCPFastOpen();
+ }
+
int rv = transport_socket_->Connect(helper_.on_io_complete());
if (rv == ERR_IO_PENDING &&
helper_.addresses().front().GetFamily() == ADDRESS_FAMILY_IPV6 &&
« net/socket/tcp_socket.cc ('K') | « net/socket/transport_client_socket_pool.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698