diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-14 05:19:00 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-14 05:19:00 +0000 |
commit | 1332c24d517e472758aae7e25301752561da6bc5 (patch) | |
tree | fa5d27c2a79e161e4268e42e095a4c1603386f39 /net/socket/transport_client_socket_pool.h | |
parent | 21afaa9258b7da139d17b249a53a2068e6367fa5 (diff) | |
download | chromium_src-1332c24d517e472758aae7e25301752561da6bc5.zip chromium_src-1332c24d517e472758aae7e25301752561da6bc5.tar.gz chromium_src-1332c24d517e472758aae7e25301752561da6bc5.tar.bz2 |
Add comments explaining the IPv6 fallback logic in TransportConnectJob.
BUG=81686
TEST=none.
Review URL: http://codereview.chromium.org/7015056
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85375 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket/transport_client_socket_pool.h')
-rw-r--r-- | net/socket/transport_client_socket_pool.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/net/socket/transport_client_socket_pool.h b/net/socket/transport_client_socket_pool.h index 2f52afc..ae10682 100644 --- a/net/socket/transport_client_socket_pool.h +++ b/net/socket/transport_client_socket_pool.h @@ -48,16 +48,22 @@ class TransportSocketParams : public base::RefCounted<TransportSocketParams> { }; // TransportConnectJob handles the host resolution necessary for socket creation -// and the transport (likely TCP) connect. +// and the transport (likely TCP) connect. TransportConnectJob also has fallback +// logic for IPv6 connect() timeouts (which may happen due to networks / routers +// with broken IPv6 support). Those timeouts take 20s, so rather than make the +// user wait 20s for the timeout to fire, we use a fallback timer +// (kIPv6FallbackTimerInMs) and start a connect() to a IPv4 address if the timer +// fires. Then we race the IPv4 connect() against the IPv6 connect() (which has +// a headstart) and return the one that completes first to the socket pool. class TransportConnectJob : public ConnectJob { public: TransportConnectJob(const std::string& group_name, - const scoped_refptr<TransportSocketParams>& params, - base::TimeDelta timeout_duration, - ClientSocketFactory* client_socket_factory, - HostResolver* host_resolver, - Delegate* delegate, - NetLog* net_log); + const scoped_refptr<TransportSocketParams>& params, + base::TimeDelta timeout_duration, + ClientSocketFactory* client_socket_factory, + HostResolver* host_resolver, + Delegate* delegate, + NetLog* net_log); virtual ~TransportConnectJob(); // ConnectJob methods. |