| 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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 } | 486 } |
| 487 return rv; | 487 return rv; |
| 488 } | 488 } |
| 489 | 489 |
| 490 void MockSSLClientSocket::Disconnect() { | 490 void MockSSLClientSocket::Disconnect() { |
| 491 MockClientSocket::Disconnect(); | 491 MockClientSocket::Disconnect(); |
| 492 if (transport_->socket() != NULL) | 492 if (transport_->socket() != NULL) |
| 493 transport_->socket()->Disconnect(); | 493 transport_->socket()->Disconnect(); |
| 494 } | 494 } |
| 495 | 495 |
| 496 bool MockSSLClientSocket::IsConnected() const { |
| 497 return transport_->socket()->IsConnected(); |
| 498 } |
| 499 |
| 496 int MockSSLClientSocket::Read(net::IOBuffer* buf, int buf_len, | 500 int MockSSLClientSocket::Read(net::IOBuffer* buf, int buf_len, |
| 497 net::CompletionCallback* callback) { | 501 net::CompletionCallback* callback) { |
| 498 return transport_->socket()->Read(buf, buf_len, callback); | 502 return transport_->socket()->Read(buf, buf_len, callback); |
| 499 } | 503 } |
| 500 | 504 |
| 501 int MockSSLClientSocket::Write(net::IOBuffer* buf, int buf_len, | 505 int MockSSLClientSocket::Write(net::IOBuffer* buf, int buf_len, |
| 502 net::CompletionCallback* callback) { | 506 net::CompletionCallback* callback) { |
| 503 return transport_->socket()->Write(buf, buf_len, callback); | 507 return transport_->socket()->Write(buf, buf_len, callback); |
| 504 } | 508 } |
| 505 | 509 |
| (...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1164 | 1168 |
| 1165 const char kSOCKS5OkRequest[] = | 1169 const char kSOCKS5OkRequest[] = |
| 1166 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 }; | 1170 { 0x05, 0x01, 0x00, 0x03, 0x04, 'h', 'o', 's', 't', 0x00, 0x50 }; |
| 1167 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest); | 1171 const int kSOCKS5OkRequestLength = arraysize(kSOCKS5OkRequest); |
| 1168 | 1172 |
| 1169 const char kSOCKS5OkResponse[] = | 1173 const char kSOCKS5OkResponse[] = |
| 1170 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 }; | 1174 { 0x05, 0x00, 0x00, 0x01, 127, 0, 0, 1, 0x00, 0x50 }; |
| 1171 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse); | 1175 const int kSOCKS5OkResponseLength = arraysize(kSOCKS5OkResponse); |
| 1172 | 1176 |
| 1173 } // namespace net | 1177 } // namespace net |
| OLD | NEW |