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 #include "net/socket/socks_client_socket.h" | 5 #include "net/socket/socks_client_socket.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "net/base/io_buffer.h" | 9 #include "net/base/io_buffer.h" |
10 #include "net/base/net_log.h" | 10 #include "net/base/net_log.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 next_state_(STATE_NONE), | 63 next_state_(STATE_NONE), |
64 user_callback_(NULL), | 64 user_callback_(NULL), |
65 completed_handshake_(false), | 65 completed_handshake_(false), |
66 bytes_sent_(0), | 66 bytes_sent_(0), |
67 bytes_received_(0), | 67 bytes_received_(0), |
68 host_resolver_(host_resolver), | 68 host_resolver_(host_resolver), |
69 host_request_info_(req_info), | 69 host_request_info_(req_info), |
70 net_log_(transport_socket->socket()->NetLog()) { | 70 net_log_(transport_socket->socket()->NetLog()) { |
71 } | 71 } |
72 | 72 |
73 SOCKSClientSocket::SOCKSClientSocket(ClientSocket* transport_socket, | 73 SOCKSClientSocket::SOCKSClientSocket(StreamSocket* transport_socket, |
74 const HostResolver::RequestInfo& req_info, | 74 const HostResolver::RequestInfo& req_info, |
75 HostResolver* host_resolver) | 75 HostResolver* host_resolver) |
76 : ALLOW_THIS_IN_INITIALIZER_LIST( | 76 : ALLOW_THIS_IN_INITIALIZER_LIST( |
77 io_callback_(this, &SOCKSClientSocket::OnIOComplete)), | 77 io_callback_(this, &SOCKSClientSocket::OnIOComplete)), |
78 transport_(new ClientSocketHandle()), | 78 transport_(new ClientSocketHandle()), |
79 next_state_(STATE_NONE), | 79 next_state_(STATE_NONE), |
80 user_callback_(NULL), | 80 user_callback_(NULL), |
81 completed_handshake_(false), | 81 completed_handshake_(false), |
82 bytes_sent_(0), | 82 bytes_sent_(0), |
83 bytes_received_(0), | 83 bytes_received_(0), |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 | 412 |
413 int SOCKSClientSocket::GetPeerAddress(AddressList* address) const { | 413 int SOCKSClientSocket::GetPeerAddress(AddressList* address) const { |
414 return transport_->socket()->GetPeerAddress(address); | 414 return transport_->socket()->GetPeerAddress(address); |
415 } | 415 } |
416 | 416 |
417 int SOCKSClientSocket::GetLocalAddress(IPEndPoint* address) const { | 417 int SOCKSClientSocket::GetLocalAddress(IPEndPoint* address) const { |
418 return transport_->socket()->GetLocalAddress(address); | 418 return transport_->socket()->GetLocalAddress(address); |
419 } | 419 } |
420 | 420 |
421 } // namespace net | 421 } // namespace net |
OLD | NEW |