OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // A toy server, which listens on a specified address for QUIC traffic and | 5 // A toy server, which listens on a specified address for QUIC traffic and |
6 // handles incoming responses. | 6 // handles incoming responses. |
7 | 7 |
8 #ifndef NET_TOOLS_QUIC_QUIC_SERVER_H_ | 8 #ifndef NET_TOOLS_QUIC_QUIC_SERVER_H_ |
9 #define NET_TOOLS_QUIC_QUIC_SERVER_H_ | 9 #define NET_TOOLS_QUIC_QUIC_SERVER_H_ |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "net/base/ip_endpoint.h" | 13 #include "net/base/ip_endpoint.h" |
14 #include "net/quic/crypto/quic_crypto_server_config.h" | 14 #include "net/quic/crypto/quic_crypto_server_config.h" |
15 #include "net/quic/quic_config.h" | 15 #include "net/quic/quic_config.h" |
16 #include "net/quic/quic_framer.h" | 16 #include "net/quic/quic_framer.h" |
17 #include "net/tools/epoll_server/epoll_server.h" | 17 #include "net/tools/epoll_server/epoll_server.h" |
18 | 18 |
19 namespace net { | 19 namespace net { |
20 | 20 |
21 namespace tools { | 21 namespace tools { |
22 | 22 |
23 namespace test { | 23 namespace test { |
24 class QuicServerPeer; | 24 class QuicServerPeer; |
25 } // namespace test | 25 } // namespace test |
26 | 26 |
27 class ProcessPacketInterface; | 27 class ProcessPacketInterface; |
28 class QuicDispatcher; | 28 class QuicDispatcher; |
| 29 class QuicPacketReader; |
29 | 30 |
30 class QuicServer : public EpollCallbackInterface { | 31 class QuicServer : public EpollCallbackInterface { |
31 public: | 32 public: |
32 QuicServer(); | 33 QuicServer(); |
33 QuicServer(const QuicConfig& config, | 34 QuicServer(const QuicConfig& config, |
34 const QuicVersionVector& supported_versions); | 35 const QuicVersionVector& supported_versions); |
35 | 36 |
36 ~QuicServer() override; | 37 ~QuicServer() override; |
37 | 38 |
38 // Start listening on the specified address. | 39 // Start listening on the specified address. |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 QuicConfig config_; | 127 QuicConfig config_; |
127 // crypto_config_ contains crypto parameters for the handshake. | 128 // crypto_config_ contains crypto parameters for the handshake. |
128 QuicCryptoServerConfig crypto_config_; | 129 QuicCryptoServerConfig crypto_config_; |
129 | 130 |
130 // This vector contains QUIC versions which we currently support. | 131 // This vector contains QUIC versions which we currently support. |
131 // This should be ordered such that the highest supported version is the first | 132 // This should be ordered such that the highest supported version is the first |
132 // element, with subsequent elements in descending order (versions can be | 133 // element, with subsequent elements in descending order (versions can be |
133 // skipped as necessary). | 134 // skipped as necessary). |
134 QuicVersionVector supported_versions_; | 135 QuicVersionVector supported_versions_; |
135 | 136 |
| 137 scoped_ptr<QuicPacketReader> packet_reader_; |
| 138 |
136 DISALLOW_COPY_AND_ASSIGN(QuicServer); | 139 DISALLOW_COPY_AND_ASSIGN(QuicServer); |
137 }; | 140 }; |
138 | 141 |
139 } // namespace tools | 142 } // namespace tools |
140 } // namespace net | 143 } // namespace net |
141 | 144 |
142 #endif // NET_TOOLS_QUIC_QUIC_SERVER_H_ | 145 #endif // NET_TOOLS_QUIC_QUIC_SERVER_H_ |
OLD | NEW |