summaryrefslogtreecommitdiffstats
path: root/net/quic/quic_client_session.h
diff options
context:
space:
mode:
authorrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-06 23:37:03 +0000
committerrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-06 23:37:03 +0000
commit65768440fe269eadef9bc7aa144699db2d7fe9d9 (patch)
tree4a62a2dade47e452d9d3d5b6ca42c11dd42fb14b /net/quic/quic_client_session.h
parentca7d4e275f63f448258f6cd805d076340543221c (diff)
downloadchromium_src-65768440fe269eadef9bc7aa144699db2d7fe9d9.zip
chromium_src-65768440fe269eadef9bc7aa144699db2d7fe9d9.tar.gz
chromium_src-65768440fe269eadef9bc7aa144699db2d7fe9d9.tar.bz2
To mitigate the effects of hanging 0-RTT QUIC connections,
set up a timer to cancel any requests, if the handshake takes too long. The requests will be retried and will use either QUIC or TCP, whichever connects first. Review URL: https://codereview.chromium.org/318993004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275552 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/quic/quic_client_session.h')
-rw-r--r--net/quic/quic_client_session.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/quic/quic_client_session.h b/net/quic/quic_client_session.h
index ca4d7b810..f12003e 100644
--- a/net/quic/quic_client_session.h
+++ b/net/quic/quic_client_session.h
@@ -99,6 +99,7 @@ class NET_EXPORT_PRIVATE QuicClientSession : public QuicClientSessionBase {
const QuicConfig& config,
uint32 max_flow_control_receive_window_bytes,
QuicCryptoClientConfig* crypto_config,
+ base::TaskRunner* task_runner,
NetLog* net_log);
virtual ~QuicClientSession();
@@ -150,6 +151,9 @@ class NET_EXPORT_PRIVATE QuicClientSession : public QuicClientSessionBase {
int CryptoConnect(bool require_confirmation,
const CompletionCallback& callback);
+ // Resumes a crypto handshake with the server after a timeout.
+ int ResumeCryptoConnect(const CompletionCallback& callback);
+
// Causes the QuicConnectionHelper to start reading from the socket
// and passing the data along to the QuicConnection.
void StartReading();
@@ -214,6 +218,8 @@ class NET_EXPORT_PRIVATE QuicClientSession : public QuicClientSessionBase {
// delete |this|.
void NotifyFactoryOfSessionClosed();
+ void OnConnectTimeout();
+
bool require_confirmation_;
scoped_ptr<QuicCryptoClientStream> crypto_stream_;
QuicStreamFactory* stream_factory_;
@@ -227,6 +233,7 @@ class NET_EXPORT_PRIVATE QuicClientSession : public QuicClientSessionBase {
bool read_pending_;
CompletionCallback callback_;
size_t num_total_streams_;
+ base::TaskRunner* task_runner_;
BoundNetLog net_log_;
QuicConnectionLogger logger_;
// Number of packets read in the current read loop.