| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/non_thread_safe.h" |
| 10 #include "base/object_watcher.h" | 11 #include "base/object_watcher.h" |
| 11 #include "net/base/address_list.h" | 12 #include "net/base/address_list.h" |
| 12 #include "net/base/completion_callback.h" | 13 #include "net/base/completion_callback.h" |
| 13 #include "net/base/net_log.h" | 14 #include "net/base/net_log.h" |
| 14 #include "net/socket/client_socket.h" | 15 #include "net/socket/client_socket.h" |
| 15 | 16 |
| 16 namespace net { | 17 namespace net { |
| 17 | 18 |
| 18 class BoundNetLog; | 19 class BoundNetLog; |
| 19 | 20 |
| 20 class TCPClientSocketWin : public ClientSocket { | 21 class TCPClientSocketWin : public ClientSocket, NonThreadSafe { |
| 21 public: | 22 public: |
| 22 // The IP address(es) and port number to connect to. The TCP socket will try | 23 // The IP address(es) and port number to connect to. The TCP socket will try |
| 23 // each IP address in the list until it succeeds in establishing a | 24 // each IP address in the list until it succeeds in establishing a |
| 24 // connection. | 25 // connection. |
| 25 TCPClientSocketWin(const AddressList& addresses, net::NetLog* net_log); | 26 TCPClientSocketWin(const AddressList& addresses, net::NetLog* net_log); |
| 26 | 27 |
| 27 ~TCPClientSocketWin(); | 28 ~TCPClientSocketWin(); |
| 28 | 29 |
| 29 // ClientSocket methods: | 30 // ClientSocket methods: |
| 30 virtual int Connect(CompletionCallback* callback); | 31 virtual int Connect(CompletionCallback* callback); |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 CompletionCallback* write_callback_; | 82 CompletionCallback* write_callback_; |
| 82 | 83 |
| 83 BoundNetLog net_log_; | 84 BoundNetLog net_log_; |
| 84 | 85 |
| 85 DISALLOW_COPY_AND_ASSIGN(TCPClientSocketWin); | 86 DISALLOW_COPY_AND_ASSIGN(TCPClientSocketWin); |
| 86 }; | 87 }; |
| 87 | 88 |
| 88 } // namespace net | 89 } // namespace net |
| 89 | 90 |
| 90 #endif // NET_SOCKET_TCP_CLIENT_SOCKET_WIN_H_ | 91 #endif // NET_SOCKET_TCP_CLIENT_SOCKET_WIN_H_ |
| OLD | NEW |