OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/socks5_client_socket.h" | 5 #include "net/socket/socks5_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 "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/format_macros.h" | 10 #include "base/format_macros.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 user_callback_(NULL), | 37 user_callback_(NULL), |
38 completed_handshake_(false), | 38 completed_handshake_(false), |
39 bytes_sent_(0), | 39 bytes_sent_(0), |
40 bytes_received_(0), | 40 bytes_received_(0), |
41 read_header_size(kReadHeaderSize), | 41 read_header_size(kReadHeaderSize), |
42 host_request_info_(req_info), | 42 host_request_info_(req_info), |
43 net_log_(transport_socket->socket()->NetLog()) { | 43 net_log_(transport_socket->socket()->NetLog()) { |
44 } | 44 } |
45 | 45 |
46 SOCKS5ClientSocket::SOCKS5ClientSocket( | 46 SOCKS5ClientSocket::SOCKS5ClientSocket( |
47 ClientSocket* transport_socket, | 47 StreamSocket* transport_socket, |
48 const HostResolver::RequestInfo& req_info) | 48 const HostResolver::RequestInfo& req_info) |
49 : ALLOW_THIS_IN_INITIALIZER_LIST( | 49 : ALLOW_THIS_IN_INITIALIZER_LIST( |
50 io_callback_(this, &SOCKS5ClientSocket::OnIOComplete)), | 50 io_callback_(this, &SOCKS5ClientSocket::OnIOComplete)), |
51 transport_(new ClientSocketHandle()), | 51 transport_(new ClientSocketHandle()), |
52 next_state_(STATE_NONE), | 52 next_state_(STATE_NONE), |
53 user_callback_(NULL), | 53 user_callback_(NULL), |
54 completed_handshake_(false), | 54 completed_handshake_(false), |
55 bytes_sent_(0), | 55 bytes_sent_(0), |
56 bytes_received_(0), | 56 bytes_received_(0), |
57 read_header_size(kReadHeaderSize), | 57 read_header_size(kReadHeaderSize), |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 | 481 |
482 int SOCKS5ClientSocket::GetPeerAddress(AddressList* address) const { | 482 int SOCKS5ClientSocket::GetPeerAddress(AddressList* address) const { |
483 return transport_->socket()->GetPeerAddress(address); | 483 return transport_->socket()->GetPeerAddress(address); |
484 } | 484 } |
485 | 485 |
486 int SOCKS5ClientSocket::GetLocalAddress(IPEndPoint* address) const { | 486 int SOCKS5ClientSocket::GetLocalAddress(IPEndPoint* address) const { |
487 return transport_->socket()->GetLocalAddress(address); | 487 return transport_->socket()->GetLocalAddress(address); |
488 } | 488 } |
489 | 489 |
490 } // namespace net | 490 } // namespace net |
OLD | NEW |