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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 // NetLog::TYPE_TCP_CONNECT. These methods set the start/end of | 90 // NetLog::TYPE_TCP_CONNECT. These methods set the start/end of |
91 // NetLog::TYPE_TCP_CONNECT. | 91 // NetLog::TYPE_TCP_CONNECT. |
92 // | 92 // |
93 // TODO(yzshen): Change logging format and let TCPClientSocket log the | 93 // TODO(yzshen): Change logging format and let TCPClientSocket log the |
94 // start/end of a series of connect attempts itself. | 94 // start/end of a series of connect attempts itself. |
95 void StartLoggingMultipleConnectAttempts(const AddressList& addresses); | 95 void StartLoggingMultipleConnectAttempts(const AddressList& addresses); |
96 void EndLoggingMultipleConnectAttempts(int net_error); | 96 void EndLoggingMultipleConnectAttempts(int net_error); |
97 | 97 |
98 const BoundNetLog& net_log() const { return net_log_; } | 98 const BoundNetLog& net_log() const { return net_log_; } |
99 | 99 |
| 100 SOCKET socket() const { return socket_; } |
| 101 |
100 private: | 102 private: |
101 class Core; | 103 class Core; |
102 | 104 |
103 // base::ObjectWatcher::Delegate implementation. | 105 // base::ObjectWatcher::Delegate implementation. |
104 virtual void OnObjectSignaled(HANDLE object) override; | 106 virtual void OnObjectSignaled(HANDLE object) override; |
105 | 107 |
106 int AcceptInternal(scoped_ptr<TCPSocketWin>* socket, | 108 int AcceptInternal(scoped_ptr<TCPSocketWin>* socket, |
107 IPEndPoint* address); | 109 IPEndPoint* address); |
108 | 110 |
109 int DoConnect(); | 111 int DoConnect(); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 bool logging_multiple_connect_attempts_; | 151 bool logging_multiple_connect_attempts_; |
150 | 152 |
151 BoundNetLog net_log_; | 153 BoundNetLog net_log_; |
152 | 154 |
153 DISALLOW_COPY_AND_ASSIGN(TCPSocketWin); | 155 DISALLOW_COPY_AND_ASSIGN(TCPSocketWin); |
154 }; | 156 }; |
155 | 157 |
156 } // namespace net | 158 } // namespace net |
157 | 159 |
158 #endif // NET_SOCKET_TCP_SOCKET_WIN_H_ | 160 #endif // NET_SOCKET_TCP_SOCKET_WIN_H_ |
OLD | NEW |