| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SOCKS5_CLIENT_SOCKET_H_ | 5 #ifndef NET_SOCKET_SOCKS5_CLIENT_SOCKET_H_ |
| 6 #define NET_SOCKET_SOCKS5_CLIENT_SOCKET_H_ | 6 #define NET_SOCKET_SOCKS5_CLIENT_SOCKET_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 // | 33 // |
| 34 // |req_info| contains the hostname and port to which the socket above will | 34 // |req_info| contains the hostname and port to which the socket above will |
| 35 // communicate to via the SOCKS layer. | 35 // communicate to via the SOCKS layer. |
| 36 // | 36 // |
| 37 // Although SOCKS 5 supports 3 different modes of addressing, we will | 37 // Although SOCKS 5 supports 3 different modes of addressing, we will |
| 38 // always pass it a hostname. This means the DNS resolving is done | 38 // always pass it a hostname. This means the DNS resolving is done |
| 39 // proxy side. | 39 // proxy side. |
| 40 SOCKS5ClientSocket(ClientSocketHandle* transport_socket, | 40 SOCKS5ClientSocket(ClientSocketHandle* transport_socket, |
| 41 const HostResolver::RequestInfo& req_info); | 41 const HostResolver::RequestInfo& req_info); |
| 42 | 42 |
| 43 // Deprecated constructor (http://crbug.com/37810) that takes a StreamSocket. | |
| 44 SOCKS5ClientSocket(StreamSocket* transport_socket, | |
| 45 const HostResolver::RequestInfo& req_info); | |
| 46 | |
| 47 // On destruction Disconnect() is called. | 43 // On destruction Disconnect() is called. |
| 48 virtual ~SOCKS5ClientSocket(); | 44 virtual ~SOCKS5ClientSocket(); |
| 49 | 45 |
| 50 // StreamSocket implementation. | 46 // StreamSocket implementation. |
| 51 | 47 |
| 52 // Does the SOCKS handshake and completes the protocol. | 48 // Does the SOCKS handshake and completes the protocol. |
| 53 virtual int Connect(const CompletionCallback& callback) OVERRIDE; | 49 virtual int Connect(const CompletionCallback& callback) OVERRIDE; |
| 54 virtual void Disconnect() OVERRIDE; | 50 virtual void Disconnect() OVERRIDE; |
| 55 virtual bool IsConnected() const OVERRIDE; | 51 virtual bool IsConnected() const OVERRIDE; |
| 56 virtual bool IsConnectedAndIdle() const OVERRIDE; | 52 virtual bool IsConnectedAndIdle() const OVERRIDE; |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 HostResolver::RequestInfo host_request_info_; | 149 HostResolver::RequestInfo host_request_info_; |
| 154 | 150 |
| 155 BoundNetLog net_log_; | 151 BoundNetLog net_log_; |
| 156 | 152 |
| 157 DISALLOW_COPY_AND_ASSIGN(SOCKS5ClientSocket); | 153 DISALLOW_COPY_AND_ASSIGN(SOCKS5ClientSocket); |
| 158 }; | 154 }; |
| 159 | 155 |
| 160 } // namespace net | 156 } // namespace net |
| 161 | 157 |
| 162 #endif // NET_SOCKET_SOCKS5_CLIENT_SOCKET_H_ | 158 #endif // NET_SOCKET_SOCKS5_CLIENT_SOCKET_H_ |
| OLD | NEW |