| 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 <winsock2.h> | 8 #include <winsock2.h> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 // - Increase the socket buffer sizes for WinXP; | 66 // - Increase the socket buffer sizes for WinXP; |
| 67 // - SetNoDelay(true); | 67 // - SetNoDelay(true); |
| 68 // - SetKeepAlive(true, 45). | 68 // - SetKeepAlive(true, 45). |
| 69 void SetDefaultOptionsForClient(); | 69 void SetDefaultOptionsForClient(); |
| 70 int SetExclusiveAddrUse(); | 70 int SetExclusiveAddrUse(); |
| 71 int SetReceiveBufferSize(int32 size); | 71 int SetReceiveBufferSize(int32 size); |
| 72 int SetSendBufferSize(int32 size); | 72 int SetSendBufferSize(int32 size); |
| 73 bool SetKeepAlive(bool enable, int delay); | 73 bool SetKeepAlive(bool enable, int delay); |
| 74 bool SetNoDelay(bool no_delay); | 74 bool SetNoDelay(bool no_delay); |
| 75 | 75 |
| 76 // Gets the estimated RTT. Returns false if the RTT is |
| 77 // unavailable. May also return false when estimated RTT is 0. |
| 78 bool GetEstimatedRoundTripTime(base::TimeDelta* out_rtt) const |
| 79 WARN_UNUSED_RESULT; |
| 80 |
| 76 void Close(); | 81 void Close(); |
| 77 | 82 |
| 78 // Setter/Getter methods for TCP FastOpen socket option. | 83 // Setter/Getter methods for TCP FastOpen socket option. |
| 79 // NOOPs since TCP FastOpen is not implemented in Windows. | 84 // NOOPs since TCP FastOpen is not implemented in Windows. |
| 80 bool UsingTCPFastOpen() const { return false; } | 85 bool UsingTCPFastOpen() const { return false; } |
| 81 void EnableTCPFastOpenIfSupported() {} | 86 void EnableTCPFastOpenIfSupported() {} |
| 82 | 87 |
| 83 bool IsValid() const { return socket_ != INVALID_SOCKET; } | 88 bool IsValid() const { return socket_ != INVALID_SOCKET; } |
| 84 | 89 |
| 85 // Marks the start/end of a series of connect attempts for logging purpose. | 90 // 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... |
| 149 bool logging_multiple_connect_attempts_; | 154 bool logging_multiple_connect_attempts_; |
| 150 | 155 |
| 151 BoundNetLog net_log_; | 156 BoundNetLog net_log_; |
| 152 | 157 |
| 153 DISALLOW_COPY_AND_ASSIGN(TCPSocketWin); | 158 DISALLOW_COPY_AND_ASSIGN(TCPSocketWin); |
| 154 }; | 159 }; |
| 155 | 160 |
| 156 } // namespace net | 161 } // namespace net |
| 157 | 162 |
| 158 #endif // NET_SOCKET_TCP_SOCKET_WIN_H_ | 163 #endif // NET_SOCKET_TCP_SOCKET_WIN_H_ |
| OLD | NEW |