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

Unified Diff: net/socket/tcp_socket_libevent.h

Issue 583883002: Adds TCP FastOpen blackhole recovery code to avoid getting persistently blackholed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | net/socket/tcp_socket_libevent.cc » ('j') | net/socket/tcp_socket_libevent.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/tcp_socket_libevent.h
diff --git a/net/socket/tcp_socket_libevent.h b/net/socket/tcp_socket_libevent.h
index 89b6a22bdd08d24b05529b6a9f2031351098d256..88960c38845faecdbb6301eed94417547226a690 100644
--- a/net/socket/tcp_socket_libevent.h
+++ b/net/socket/tcp_socket_libevent.h
@@ -88,7 +88,7 @@ class NET_EXPORT TCPSocketLibevent {
private:
// States that a fast open socket attempt can result in.
- enum FastOpenStatus {
+ enum TCPFastOpenStatus {
FAST_OPEN_STATUS_UNKNOWN,
// The initial fast open connect attempted returned synchronously,
@@ -103,6 +103,14 @@ class NET_EXPORT TCPSocketLibevent {
// fast open would have worked.
FAST_OPEN_ERROR,
+ // The initial fast open connect succeeded immediately
+ // (FAST_OPEN_FAST_CONNECT_RETURN) and the attempt to write SYN+DATA failed.
+ FAST_OPEN_FAST_CONNECT_FAILED,
+
+ // The initial fast open connect failed (FAST_OPEN_SLOW_CONNECT_RETURN)
+ // and the first attempt to write data failed.
+ FAST_OPEN_SLOW_CONNECT_FAILED,
+
// An attempt to do a fast open succeeded immediately
// (FAST_OPEN_FAST_CONNECT_RETURN) and we later confirmed that the server
// had acked the data we sent.
@@ -165,17 +173,19 @@ class NET_EXPORT TCPSocketLibevent {
const CompletionCallback& callback);
// Called when the socket is known to be in a connected state.
- void RecordFastOpenStatus();
+ void RecordTCPFastOpenStatus();
scoped_ptr<SocketLibevent> socket_;
scoped_ptr<SocketLibevent> accept_socket_;
// Enables experimental TCP FastOpen option.
bool use_tcp_fastopen_;
-
+ // True when TCP FastOpen is in use and we have attempted the
+ // connect with write.
+ bool tcp_fastopen_write_attempted_;
// True when TCP FastOpen is in use and we have done the connect.
bool tcp_fastopen_connected_;
- FastOpenStatus fast_open_status_;
+ TCPFastOpenStatus tcp_fastopen_status_;
bool logging_multiple_connect_attempts_;
« no previous file with comments | « no previous file | net/socket/tcp_socket_libevent.cc » ('j') | net/socket/tcp_socket_libevent.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698