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_; |