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/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "net/base/ip_endpoint.h" | 12 #include "net/base/ip_endpoint.h" |
13 #include "net/quic/quic_framer.h" | 13 #include "net/quic/quic_framer.h" |
14 #include "net/tools/flip_server/epoll_server.h" | 14 #include "net/tools/flip_server/epoll_server.h" |
15 #include "net/tools/quic/quic_dispatcher.h" | 15 #include "net/tools/quic/quic_dispatcher.h" |
16 | 16 |
17 namespace net { | 17 namespace net { |
| 18 namespace tools { |
18 | 19 |
19 class QuicDispatcher; | 20 class QuicDispatcher; |
20 | 21 |
21 class QuicServer : public EpollCallbackInterface { | 22 class QuicServer : public EpollCallbackInterface { |
22 public: | 23 public: |
23 QuicServer(); | 24 QuicServer(); |
24 virtual ~QuicServer(); | 25 virtual ~QuicServer(); |
25 | 26 |
26 // Start listening on the specified address. | 27 // Start listening on the specified address. |
27 bool Listen(const IPEndPoint& address); | 28 bool Listen(const IPEndPoint& address); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 // True if the kernel supports SO_RXQ_OVFL, the number of packets dropped | 78 // True if the kernel supports SO_RXQ_OVFL, the number of packets dropped |
78 // because the socket would otherwise overflow. | 79 // because the socket would otherwise overflow. |
79 bool overflow_supported_; | 80 bool overflow_supported_; |
80 | 81 |
81 // If true, use recvmmsg for reading. | 82 // If true, use recvmmsg for reading. |
82 bool use_recvmmsg_; | 83 bool use_recvmmsg_; |
83 | 84 |
84 DISALLOW_COPY_AND_ASSIGN(QuicServer); | 85 DISALLOW_COPY_AND_ASSIGN(QuicServer); |
85 }; | 86 }; |
86 | 87 |
| 88 } // namespace tools |
87 } // namespace net | 89 } // namespace net |
88 | 90 |
89 #endif // NET_TOOLS_QUIC_QUIC_SERVER_H_ | 91 #endif // NET_TOOLS_QUIC_QUIC_SERVER_H_ |
OLD | NEW |