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

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: Fixed constness 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') | no next file with comments »
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..b63214888bc6b09ca3e8fe7ad9a0fb787cc99d7b 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.
@@ -158,24 +166,26 @@ class NET_EXPORT TCPSocketLibevent {
void WriteCompleted(const scoped_refptr<IOBuffer>& buf,
const CompletionCallback& callback,
- int rv) const;
- int HandleWriteCompleted(IOBuffer* buf, int rv) const;
+ int rv);
+ int HandleWriteCompleted(IOBuffer* buf, int rv);
int TcpFastOpenWrite(IOBuffer* buf,
int buf_len,
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_;
Randy Smith (Not in Mondays) 2014/09/22 16:05:13 nit, suggestion: I'm used to a blank line before c
Jana 2014/09/22 17:04:56 Done.
// 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698