| 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 unavailable. |
| 77 bool GetEstimatedRoundTripTime(base::TimeDelta* out_rtt); |
| 78 |
| 76 void Close(); | 79 void Close(); |
| 77 | 80 |
| 78 // Setter/Getter methods for TCP FastOpen socket option. | 81 // Setter/Getter methods for TCP FastOpen socket option. |
| 79 // NOOPs since TCP FastOpen is not implemented in Windows. | 82 // NOOPs since TCP FastOpen is not implemented in Windows. |
| 80 bool UsingTCPFastOpen() const { return false; } | 83 bool UsingTCPFastOpen() const { return false; } |
| 81 void EnableTCPFastOpenIfSupported() {} | 84 void EnableTCPFastOpenIfSupported() {} |
| 82 | 85 |
| 83 bool IsValid() const { return socket_ != INVALID_SOCKET; } | 86 bool IsValid() const { return socket_ != INVALID_SOCKET; } |
| 84 | 87 |
| 85 // Marks the start/end of a series of connect attempts for logging purpose. | 88 // 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_; | 152 bool logging_multiple_connect_attempts_; |
| 150 | 153 |
| 151 BoundNetLog net_log_; | 154 BoundNetLog net_log_; |
| 152 | 155 |
| 153 DISALLOW_COPY_AND_ASSIGN(TCPSocketWin); | 156 DISALLOW_COPY_AND_ASSIGN(TCPSocketWin); |
| 154 }; | 157 }; |
| 155 | 158 |
| 156 } // namespace net | 159 } // namespace net |
| 157 | 160 |
| 158 #endif // NET_SOCKET_TCP_SOCKET_WIN_H_ | 161 #endif // NET_SOCKET_TCP_SOCKET_WIN_H_ |
| OLD | NEW |