Chromium Code Reviews| 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 // This test suite uses SSLClientSocket to test the implementation of | 5 // This test suite uses SSLClientSocket to test the implementation of |
| 6 // SSLServerSocket. In order to establish connections between the sockets | 6 // SSLServerSocket. In order to establish connections between the sockets |
| 7 // we need two additional classes: | 7 // we need two additional classes: |
| 8 // 1. FakeSocket | 8 // 1. FakeSocket |
| 9 // Connects SSL socket to FakeDataChannel. This class is just a stub. | 9 // Connects SSL socket to FakeDataChannel. This class is just a stub. |
| 10 // | 10 // |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 113 virtual int Read(IOBuffer* buf, int buf_len, | 113 virtual int Read(IOBuffer* buf, int buf_len, |
| 114 CompletionCallback* callback) { | 114 CompletionCallback* callback) { |
| 115 return incoming_->Read(buf, buf_len, callback); | 115 return incoming_->Read(buf, buf_len, callback); |
| 116 } | 116 } |
| 117 | 117 |
| 118 virtual int Write(IOBuffer* buf, int buf_len, | 118 virtual int Write(IOBuffer* buf, int buf_len, |
| 119 CompletionCallback* callback) { | 119 CompletionCallback* callback) { |
| 120 return outgoing_->Write(buf, buf_len, callback); | 120 return outgoing_->Write(buf, buf_len, callback); |
| 121 } | 121 } |
| 122 | 122 |
| 123 virtual int Write(IOBuffer* buf, int buf_len, int sctp_stream_id, | |
| 124 CompletionCallback* callback) { | |
|
Mike Belshe
2011/04/06 18:32:53
This is old...
| |
| 125 return Write(buf, buf_len, callback); | |
| 126 } | |
| 127 | |
| 123 virtual bool SetReceiveBufferSize(int32 size) { | 128 virtual bool SetReceiveBufferSize(int32 size) { |
| 124 return true; | 129 return true; |
| 125 } | 130 } |
| 126 | 131 |
| 127 virtual bool SetSendBufferSize(int32 size) { | 132 virtual bool SetSendBufferSize(int32 size) { |
| 128 return true; | 133 return true; |
| 129 } | 134 } |
| 130 | 135 |
| 131 virtual int Connect(CompletionCallback* callback) { | 136 virtual int Connect(CompletionCallback* callback) { |
| 132 return net::OK; | 137 return net::OK; |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 354 EXPECT_GT(read_callback.WaitForResult(), 0); | 359 EXPECT_GT(read_callback.WaitForResult(), 0); |
| 355 } | 360 } |
| 356 if (client_ret == net::ERR_IO_PENDING) { | 361 if (client_ret == net::ERR_IO_PENDING) { |
| 357 EXPECT_GT(write_callback.WaitForResult(), 0); | 362 EXPECT_GT(write_callback.WaitForResult(), 0); |
| 358 } | 363 } |
| 359 EXPECT_EQ(0, memcmp(write_buf->data(), read_buf->data(), write_buf->size())); | 364 EXPECT_EQ(0, memcmp(write_buf->data(), read_buf->data(), write_buf->size())); |
| 360 } | 365 } |
| 361 #endif | 366 #endif |
| 362 | 367 |
| 363 } // namespace net | 368 } // namespace net |
| OLD | NEW |