| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_BASE_TCP_PINGER_H_ | 5 #ifndef NET_SOCKET_TCP_PINGER_H_ |
| 6 #define NET_BASE_TCP_PINGER_H_ | 6 #define NET_SOCKET_TCP_PINGER_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/ref_counted.h" | 9 #include "base/ref_counted.h" |
| 10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
| 11 #include "base/task.h" | 11 #include "base/task.h" |
| 12 #include "base/thread.h" | 12 #include "base/thread.h" |
| 13 #include "base/waitable_event.h" | 13 #include "base/waitable_event.h" |
| 14 #include "net/base/address_list.h" | 14 #include "net/base/address_list.h" |
| 15 #include "net/base/completion_callback.h" | 15 #include "net/base/completion_callback.h" |
| 16 #include "net/base/net_errors.h" | 16 #include "net/base/net_errors.h" |
| 17 #include "net/base/tcp_client_socket.h" | 17 #include "net/socket/tcp_client_socket.h" |
| 18 | 18 |
| 19 namespace base { | 19 namespace base { |
| 20 class TimeDelta; | 20 class TimeDelta; |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace net { | 23 namespace net { |
| 24 | 24 |
| 25 // Simple class to wait until a TCP server is accepting connections. | 25 // Simple class to wait until a TCP server is accepting connections. |
| 26 class TCPPinger { | 26 class TCPPinger { |
| 27 public: | 27 public: |
| 28 explicit TCPPinger(const net::AddressList& addr) | 28 explicit TCPPinger(const net::AddressList& addr) |
| 29 : io_thread_("TCPPinger"), | 29 : io_thread_("TCPPinger"), |
| 30 worker_(new Worker(addr)) { | 30 worker_(new Worker(addr)) { |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 net::CompletionCallbackImpl<Worker> connect_callback_; | 122 net::CompletionCallbackImpl<Worker> connect_callback_; |
| 123 }; | 123 }; |
| 124 | 124 |
| 125 base::Thread io_thread_; | 125 base::Thread io_thread_; |
| 126 Worker* worker_; | 126 Worker* worker_; |
| 127 DISALLOW_COPY_AND_ASSIGN(TCPPinger); | 127 DISALLOW_COPY_AND_ASSIGN(TCPPinger); |
| 128 }; | 128 }; |
| 129 | 129 |
| 130 } // namespace net | 130 } // namespace net |
| 131 | 131 |
| 132 #endif // NET_BASE_TCP_PINGER_H_ | 132 #endif // NET_SOCKET_TCP_PINGER_H_ |
| OLD | NEW |