| 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/socket_test_util.h" | 5 #include "net/socket/socket_test_util.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 | 10 |
| (...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 624 | 624 |
| 625 bool MockClientSocket::IsConnected() const { | 625 bool MockClientSocket::IsConnected() const { |
| 626 return connected_; | 626 return connected_; |
| 627 } | 627 } |
| 628 | 628 |
| 629 bool MockClientSocket::IsConnectedAndIdle() const { | 629 bool MockClientSocket::IsConnectedAndIdle() const { |
| 630 return connected_; | 630 return connected_; |
| 631 } | 631 } |
| 632 | 632 |
| 633 int MockClientSocket::GetPeerAddress(AddressList* address) const { | 633 int MockClientSocket::GetPeerAddress(AddressList* address) const { |
| 634 return net::SystemHostResolverProc("localhost", ADDRESS_FAMILY_UNSPECIFIED, | 634 return net::SystemHostResolverProc("192.0.2.33", ADDRESS_FAMILY_UNSPECIFIED, |
| 635 0, address, NULL); | 635 0, address, NULL); |
| 636 } | 636 } |
| 637 | 637 |
| 638 const BoundNetLog& MockClientSocket::NetLog() const { | 638 const BoundNetLog& MockClientSocket::NetLog() const { |
| 639 return net_log_; | 639 return net_log_; |
| 640 } | 640 } |
| 641 | 641 |
| 642 void MockClientSocket::GetSSLInfo(net::SSLInfo* ssl_info) { | 642 void MockClientSocket::GetSSLInfo(net::SSLInfo* ssl_info) { |
| 643 NOTREACHED(); | 643 NOTREACHED(); |
| 644 } | 644 } |
| (...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1345 | 1345 |
| 1346 const char kSOCKS5OkRequest[] = | 1346 const char kSOCKS5OkRequest[] = |
| 1347 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 }; | 1347 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 }; |
| 1348 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest); | 1348 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest); |
| 1349 | 1349 |
| 1350 const char kSOCKS5OkResponse[] = | 1350 const char kSOCKS5OkResponse[] = |
| 1351 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 }; | 1351 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 }; |
| 1352 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse); | 1352 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse); |
| 1353 | 1353 |
| 1354 } // namespace net | 1354 } // namespace net |
| OLD | NEW |