OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_CLIENT_SOCKET_WIN_H_ | 5 #ifndef NET_SOCKET_TCP_CLIENT_SOCKET_WIN_H_ |
6 #define NET_SOCKET_TCP_CLIENT_SOCKET_WIN_H_ | 6 #define NET_SOCKET_TCP_CLIENT_SOCKET_WIN_H_ |
7 | 7 |
8 #include <winsock2.h> | 8 #include <winsock2.h> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 virtual void Disconnect(); | 45 virtual void Disconnect(); |
46 virtual bool IsConnected() const; | 46 virtual bool IsConnected() const; |
47 virtual bool IsConnectedAndIdle() const; | 47 virtual bool IsConnectedAndIdle() const; |
48 virtual int GetPeerAddress(IPEndPoint* address) const; | 48 virtual int GetPeerAddress(IPEndPoint* address) const; |
49 virtual int GetLocalAddress(IPEndPoint* address) const; | 49 virtual int GetLocalAddress(IPEndPoint* address) const; |
50 virtual const BoundNetLog& NetLog() const { return net_log_; } | 50 virtual const BoundNetLog& NetLog() const { return net_log_; } |
51 virtual void SetSubresourceSpeculation(); | 51 virtual void SetSubresourceSpeculation(); |
52 virtual void SetOmniboxSpeculation(); | 52 virtual void SetOmniboxSpeculation(); |
53 virtual bool WasEverUsed() const; | 53 virtual bool WasEverUsed() const; |
54 virtual bool UsingTCPFastOpen() const; | 54 virtual bool UsingTCPFastOpen() const; |
55 virtual int64 NumBytesRead() const; | |
56 virtual base::TimeDelta GetConnectTimeMicros() const; | |
57 virtual bool WasNpnNegotiated() const OVERRIDE; | 55 virtual bool WasNpnNegotiated() const OVERRIDE; |
58 virtual NextProto GetNegotiatedProtocol() const OVERRIDE; | 56 virtual NextProto GetNegotiatedProtocol() const OVERRIDE; |
59 virtual bool GetSSLInfo(SSLInfo* ssl_info) OVERRIDE; | 57 virtual bool GetSSLInfo(SSLInfo* ssl_info) OVERRIDE; |
60 | 58 |
61 // Socket implementation. | 59 // Socket implementation. |
62 // Multiple outstanding requests are not supported. | 60 // Multiple outstanding requests are not supported. |
63 // Full duplex mode (reading and writing at the same time) is supported | 61 // Full duplex mode (reading and writing at the same time) is supported |
64 virtual int Read(IOBuffer* buf, int buf_len, | 62 virtual int Read(IOBuffer* buf, int buf_len, |
65 const CompletionCallback& callback); | 63 const CompletionCallback& callback); |
66 virtual int Write(IOBuffer* buf, int buf_len, | 64 virtual int Write(IOBuffer* buf, int buf_len, |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 | 147 |
150 BoundNetLog net_log_; | 148 BoundNetLog net_log_; |
151 | 149 |
152 // This socket was previously disconnected and has not been re-connected. | 150 // This socket was previously disconnected and has not been re-connected. |
153 bool previously_disconnected_; | 151 bool previously_disconnected_; |
154 | 152 |
155 // Record of connectivity and transmissions, for use in speculative connection | 153 // Record of connectivity and transmissions, for use in speculative connection |
156 // histograms. | 154 // histograms. |
157 UseHistory use_history_; | 155 UseHistory use_history_; |
158 | 156 |
159 base::TimeTicks connect_start_time_; | |
160 base::TimeDelta connect_time_micros_; | |
161 int64 num_bytes_read_; | |
162 | |
163 DISALLOW_COPY_AND_ASSIGN(TCPClientSocketWin); | 157 DISALLOW_COPY_AND_ASSIGN(TCPClientSocketWin); |
164 }; | 158 }; |
165 | 159 |
166 } // namespace net | 160 } // namespace net |
167 | 161 |
168 #endif // NET_SOCKET_TCP_CLIENT_SOCKET_WIN_H_ | 162 #endif // NET_SOCKET_TCP_CLIENT_SOCKET_WIN_H_ |
OLD | NEW |