| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-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_CLIENT_SOCKET_LIBEVENT_H_ | 5 #ifndef NET_SOCKET_TCP_CLIENT_SOCKET_LIBEVENT_H_ |
| 6 #define NET_BASE_TCP_CLIENT_SOCKET_LIBEVENT_H_ | 6 #define NET_SOCKET_TCP_CLIENT_SOCKET_LIBEVENT_H_ |
| 7 | 7 |
| 8 #include <sys/socket.h> // for struct sockaddr | 8 #include <sys/socket.h> // for struct sockaddr |
| 9 | 9 |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| 11 #include "base/ref_counted.h" | 11 #include "base/ref_counted.h" |
| 12 #include "base/scoped_ptr.h" | 12 #include "base/scoped_ptr.h" |
| 13 #include "net/base/address_list.h" | 13 #include "net/base/address_list.h" |
| 14 #include "net/base/client_socket.h" | |
| 15 #include "net/base/completion_callback.h" | 14 #include "net/base/completion_callback.h" |
| 15 #include "net/socket/client_socket.h" |
| 16 | 16 |
| 17 struct event; // From libevent | 17 struct event; // From libevent |
| 18 | 18 |
| 19 namespace net { | 19 namespace net { |
| 20 | 20 |
| 21 // A client socket that uses TCP as the transport layer. | 21 // A client socket that uses TCP as the transport layer. |
| 22 class TCPClientSocketLibevent : public ClientSocket { | 22 class TCPClientSocketLibevent : public ClientSocket { |
| 23 public: | 23 public: |
| 24 // The IP address(es) and port number to connect to. The TCP socket will try | 24 // The IP address(es) and port number to connect to. The TCP socket will try |
| 25 // each IP address in the list until it succeeds in establishing a | 25 // each IP address in the list until it succeeds in establishing a |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 CompletionCallback* read_callback_; | 125 CompletionCallback* read_callback_; |
| 126 | 126 |
| 127 // External callback; called when write is complete. | 127 // External callback; called when write is complete. |
| 128 CompletionCallback* write_callback_; | 128 CompletionCallback* write_callback_; |
| 129 | 129 |
| 130 DISALLOW_COPY_AND_ASSIGN(TCPClientSocketLibevent); | 130 DISALLOW_COPY_AND_ASSIGN(TCPClientSocketLibevent); |
| 131 }; | 131 }; |
| 132 | 132 |
| 133 } // namespace net | 133 } // namespace net |
| 134 | 134 |
| 135 #endif // NET_BASE_TCP_CLIENT_SOCKET_LIBEVENT_H_ | 135 #endif // NET_SOCKET_TCP_CLIENT_SOCKET_LIBEVENT_H_ |
| OLD | NEW |