OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef NET_CURVECP_TEST_SERVER_H_ | 5 #ifndef NET_CURVECP_TEST_SERVER_H_ |
6 #define NET_CURVECP_TEST_SERVER_H_ | 6 #define NET_CURVECP_TEST_SERVER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/task.h" | 9 #include "base/task.h" |
10 #include "net/base/completion_callback.h" | 10 #include "net/base/completion_callback.h" |
| 11 #include "net/base/test_data_stream.h" |
11 #include "net/curvecp/curvecp_server_socket.h" | 12 #include "net/curvecp/curvecp_server_socket.h" |
12 #include "net/curvecp/test_data_stream.h" | |
13 | 13 |
14 namespace net { | 14 namespace net { |
15 | 15 |
16 class DrainableIOBuffer; | 16 class DrainableIOBuffer; |
17 class EchoServer; | 17 class EchoServer; |
18 class IOBuffer; | 18 class IOBuffer; |
19 | 19 |
20 // TestServer is the server which processes the listen socket. | 20 // TestServer is the server which processes the listen socket. |
21 // It will create an EchoServer instance to handle each connection. | 21 // It will create an EchoServer instance to handle each connection. |
22 class TestServer : public CompletionCallback, | 22 class TestServer : public CompletionCallback, |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 scoped_refptr<DrainableIOBuffer> write_buffer_; | 65 scoped_refptr<DrainableIOBuffer> write_buffer_; |
66 TestDataStream received_stream_; | 66 TestDataStream received_stream_; |
67 int bytes_received_; | 67 int bytes_received_; |
68 CompletionCallbackImpl<EchoServer> read_callback_; | 68 CompletionCallbackImpl<EchoServer> read_callback_; |
69 CompletionCallbackImpl<EchoServer> write_callback_; | 69 CompletionCallbackImpl<EchoServer> write_callback_; |
70 }; | 70 }; |
71 | 71 |
72 } // namespace net | 72 } // namespace net |
73 | 73 |
74 #endif // NET_CURVECP_TEST_SERVER_H_ | 74 #endif // NET_CURVECP_TEST_SERVER_H_ |
OLD | NEW |