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_WIN_H_ | 5 #ifndef NET_SOCKET_TCP_SOCKET_WIN_H_ |
6 #define NET_SOCKET_TCP_SOCKET_WIN_H_ | 6 #define NET_SOCKET_TCP_SOCKET_WIN_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <winsock2.h> | 9 #include <winsock2.h> |
10 | 10 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 bool SetKeepAlive(bool enable, int delay); | 74 bool SetKeepAlive(bool enable, int delay); |
75 bool SetNoDelay(bool no_delay); | 75 bool SetNoDelay(bool no_delay); |
76 | 76 |
77 // Gets the estimated RTT. Returns false if the RTT is | 77 // Gets the estimated RTT. Returns false if the RTT is |
78 // unavailable. May also return false when estimated RTT is 0. | 78 // unavailable. May also return false when estimated RTT is 0. |
79 bool GetEstimatedRoundTripTime(base::TimeDelta* out_rtt) const | 79 bool GetEstimatedRoundTripTime(base::TimeDelta* out_rtt) const |
80 WARN_UNUSED_RESULT; | 80 WARN_UNUSED_RESULT; |
81 | 81 |
82 void Close(); | 82 void Close(); |
83 | 83 |
84 // Setter/Getter methods for TCP FastOpen socket option. | 84 // NOOP since TCP FastOpen is not implemented in Windows. |
85 // NOOPs since TCP FastOpen is not implemented in Windows. | |
86 bool UsingTCPFastOpen() const { return false; } | |
87 void EnableTCPFastOpenIfSupported() {} | 85 void EnableTCPFastOpenIfSupported() {} |
88 | 86 |
89 bool IsValid() const { return socket_ != INVALID_SOCKET; } | 87 bool IsValid() const { return socket_ != INVALID_SOCKET; } |
90 | 88 |
91 // Detachs from the current thread, to allow the socket to be transferred to | 89 // Detachs from the current thread, to allow the socket to be transferred to |
92 // a new thread. Should only be called when the object is no longer used by | 90 // a new thread. Should only be called when the object is no longer used by |
93 // the old thread. | 91 // the old thread. |
94 void DetachFromThread(); | 92 void DetachFromThread(); |
95 | 93 |
96 // Marks the start/end of a series of connect attempts for logging purpose. | 94 // Marks the start/end of a series of connect attempts for logging purpose. |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 bool logging_multiple_connect_attempts_; | 158 bool logging_multiple_connect_attempts_; |
161 | 159 |
162 BoundNetLog net_log_; | 160 BoundNetLog net_log_; |
163 | 161 |
164 DISALLOW_COPY_AND_ASSIGN(TCPSocketWin); | 162 DISALLOW_COPY_AND_ASSIGN(TCPSocketWin); |
165 }; | 163 }; |
166 | 164 |
167 } // namespace net | 165 } // namespace net |
168 | 166 |
169 #endif // NET_SOCKET_TCP_SOCKET_WIN_H_ | 167 #endif // NET_SOCKET_TCP_SOCKET_WIN_H_ |
OLD | NEW |