diff options
author | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-22 17:17:26 +0000 |
---|---|---|
committer | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-22 17:17:26 +0000 |
commit | a796bcec176ca3875a55346800b3a60a83e2dd89 (patch) | |
tree | 2533c17673ff50f4f101e803c2dff3bf8f5cbf7b /net/socket/socket_test_util.cc | |
parent | 35818452760c23c570b7947e00a3b38e733ce58e (diff) | |
download | chromium_src-a796bcec176ca3875a55346800b3a60a83e2dd89.zip chromium_src-a796bcec176ca3875a55346800b3a60a83e2dd89.tar.gz chromium_src-a796bcec176ca3875a55346800b3a60a83e2dd89.tar.bz2 |
Implement SOCKSClientSocketPool
This is the first layered pool, so there are several infrastructure changes in this change as well.
Add a ConnectionTimeout method to pools so that layered pools can timeout each phase.
Add a name method to pools to support per pool UMA histograms.
Change SOCKS sockets to take a ClientSocketHandle instead of a ClientSocket
BUG=30357 (blocks an SSL Pool)
TEST=existing unit tests
Review URL: http://codereview.chromium.org/668097
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42231 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket/socket_test_util.cc')
-rw-r--r-- | net/socket/socket_test_util.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/net/socket/socket_test_util.cc b/net/socket/socket_test_util.cc index ba0c8dc..8b8153e 100644 --- a/net/socket/socket_test_util.cc +++ b/net/socket/socket_test_util.cc @@ -472,4 +472,18 @@ void ClientSocketPoolTest::ReleaseAllConnections(KeepAlive keep_alive) { } while (released_one); } +const char kSOCKS5GreetRequest[] = { 0x05, 0x01, 0x00 }; +const int kSOCKS5GreetRequestLength = arraysize(kSOCKS5GreetRequest); + +const char kSOCKS5GreetResponse[] = { 0x05, 0x00 }; +const int kSOCKS5GreetResponseLength = arraysize(kSOCKS5GreetResponse); + +const char kSOCKS5OkRequest[] = + { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 }; +const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest); + +const char kSOCKS5OkResponse[] = + { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 }; +const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse); + } // namespace net |