| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_LIBEVENT_H_ | 5 #ifndef NET_SOCKET_TCP_CLIENT_SOCKET_LIBEVENT_H_ |
| 6 #define NET_SOCKET_TCP_CLIENT_SOCKET_LIBEVENT_H_ | 6 #define NET_SOCKET_TCP_CLIENT_SOCKET_LIBEVENT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
| 12 #include "base/threading/non_thread_safe.h" | 12 #include "base/threading/non_thread_safe.h" |
| 13 #include "net/base/address_list.h" | 13 #include "net/base/address_list.h" |
| 14 #include "net/base/completion_callback.h" | 14 #include "net/base/completion_callback.h" |
| 15 #include "net/base/net_log.h" | 15 #include "net/base/net_log.h" |
| 16 #include "net/socket/stream_socket.h" | 16 #include "net/socket/stream_socket.h" |
| 17 | 17 |
| 18 namespace net { | 18 namespace net { |
| 19 | 19 |
| 20 class BoundNetLog; | 20 class BoundNetLog; |
| 21 | 21 |
| 22 // A client socket that uses TCP as the transport layer. | 22 // A client socket that uses TCP as the transport layer. |
| 23 class NET_TEST TCPClientSocketLibevent : public StreamSocket, | 23 class NET_EXPORT_PRIVATE TCPClientSocketLibevent : public StreamSocket, |
| 24 public base::NonThreadSafe { | 24 public base::NonThreadSafe { |
| 25 public: | 25 public: |
| 26 // The IP address(es) and port number to connect to. The TCP socket will try | 26 // The IP address(es) and port number to connect to. The TCP socket will try |
| 27 // each IP address in the list until it succeeds in establishing a | 27 // each IP address in the list until it succeeds in establishing a |
| 28 // connection. | 28 // connection. |
| 29 TCPClientSocketLibevent(const AddressList& addresses, | 29 TCPClientSocketLibevent(const AddressList& addresses, |
| 30 net::NetLog* net_log, | 30 net::NetLog* net_log, |
| 31 const net::NetLog::Source& source); | 31 const net::NetLog::Source& source); |
| 32 | 32 |
| 33 virtual ~TCPClientSocketLibevent(); | 33 virtual ~TCPClientSocketLibevent(); |
| 34 | 34 |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 base::TimeTicks connect_start_time_; | 201 base::TimeTicks connect_start_time_; |
| 202 base::TimeDelta connect_time_micros_; | 202 base::TimeDelta connect_time_micros_; |
| 203 int64 num_bytes_read_; | 203 int64 num_bytes_read_; |
| 204 | 204 |
| 205 DISALLOW_COPY_AND_ASSIGN(TCPClientSocketLibevent); | 205 DISALLOW_COPY_AND_ASSIGN(TCPClientSocketLibevent); |
| 206 }; | 206 }; |
| 207 | 207 |
| 208 } // namespace net | 208 } // namespace net |
| 209 | 209 |
| 210 #endif // NET_SOCKET_TCP_CLIENT_SOCKET_LIBEVENT_H_ | 210 #endif // NET_SOCKET_TCP_CLIENT_SOCKET_LIBEVENT_H_ |
| OLD | NEW |