| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NET_SOCKET_TCP_SOCKET_POSIX_H_ | 5 #ifndef NET_SOCKET_TCP_SOCKET_POSIX_H_ |
| 6 #define NET_SOCKET_TCP_SOCKET_POSIX_H_ | 6 #define NET_SOCKET_TCP_SOCKET_POSIX_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 bool SetKeepAlive(bool enable, int delay); | 66 bool SetKeepAlive(bool enable, int delay); |
| 67 bool SetNoDelay(bool no_delay); | 67 bool SetNoDelay(bool no_delay); |
| 68 | 68 |
| 69 // Gets the estimated RTT. Returns false if the RTT is | 69 // Gets the estimated RTT. Returns false if the RTT is |
| 70 // unavailable. May also return false when estimated RTT is 0. | 70 // unavailable. May also return false when estimated RTT is 0. |
| 71 bool GetEstimatedRoundTripTime(base::TimeDelta* out_rtt) const | 71 bool GetEstimatedRoundTripTime(base::TimeDelta* out_rtt) const |
| 72 WARN_UNUSED_RESULT; | 72 WARN_UNUSED_RESULT; |
| 73 | 73 |
| 74 void Close(); | 74 void Close(); |
| 75 | 75 |
| 76 // Setter/Getter methods for TCP FastOpen socket option. | |
| 77 bool UsingTCPFastOpen() const; | |
| 78 void EnableTCPFastOpenIfSupported(); | 76 void EnableTCPFastOpenIfSupported(); |
| 79 | 77 |
| 80 bool IsValid() const; | 78 bool IsValid() const; |
| 81 | 79 |
| 82 // Detachs from the current thread, to allow the socket to be transferred to | 80 // Detachs from the current thread, to allow the socket to be transferred to |
| 83 // a new thread. Should only be called when the object is no longer used by | 81 // a new thread. Should only be called when the object is no longer used by |
| 84 // the old thread. | 82 // the old thread. |
| 85 void DetachFromThread(); | 83 void DetachFromThread(); |
| 86 | 84 |
| 87 // Marks the start/end of a series of connect attempts for logging purpose. | 85 // Marks the start/end of a series of connect attempts for logging purpose. |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 bool logging_multiple_connect_attempts_; | 216 bool logging_multiple_connect_attempts_; |
| 219 | 217 |
| 220 BoundNetLog net_log_; | 218 BoundNetLog net_log_; |
| 221 | 219 |
| 222 DISALLOW_COPY_AND_ASSIGN(TCPSocketPosix); | 220 DISALLOW_COPY_AND_ASSIGN(TCPSocketPosix); |
| 223 }; | 221 }; |
| 224 | 222 |
| 225 } // namespace net | 223 } // namespace net |
| 226 | 224 |
| 227 #endif // NET_SOCKET_TCP_SOCKET_POSIX_H_ | 225 #endif // NET_SOCKET_TCP_SOCKET_POSIX_H_ |
| OLD | NEW |