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 server side dispatcher which dispatches a given client's data to their | 5 // A server side dispatcher which dispatches a given client's data to their |
6 // stream. | 6 // stream. |
7 | 7 |
8 #ifndef NET_TOOLS_QUIC_QUIC_DISPATCHER_H_ | 8 #ifndef NET_TOOLS_QUIC_QUIC_DISPATCHER_H_ |
9 #define NET_TOOLS_QUIC_QUIC_DISPATCHER_H_ | 9 #define NET_TOOLS_QUIC_QUIC_DISPATCHER_H_ |
10 | 10 |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 private: | 191 private: |
192 class QuicFramerVisitor; | 192 class QuicFramerVisitor; |
193 friend class net::tools::test::QuicDispatcherPeer; | 193 friend class net::tools::test::QuicDispatcherPeer; |
194 | 194 |
195 // An adapter that creates packet writers using the dispatcher's | 195 // An adapter that creates packet writers using the dispatcher's |
196 // PacketWriterFactory and shared writer. Essentially, it just curries the | 196 // PacketWriterFactory and shared writer. Essentially, it just curries the |
197 // writer argument away from QuicDispatcher::PacketWriterFactory. | 197 // writer argument away from QuicDispatcher::PacketWriterFactory. |
198 class PacketWriterFactoryAdapter : | 198 class PacketWriterFactoryAdapter : |
199 public QuicConnection::PacketWriterFactory { | 199 public QuicConnection::PacketWriterFactory { |
200 public: | 200 public: |
201 PacketWriterFactoryAdapter(QuicDispatcher* dispatcher); | 201 explicit PacketWriterFactoryAdapter(QuicDispatcher* dispatcher); |
202 ~PacketWriterFactoryAdapter() override; | 202 ~PacketWriterFactoryAdapter() override; |
203 | 203 |
204 QuicPacketWriter* Create(QuicConnection* connection) const override; | 204 QuicPacketWriter* Create(QuicConnection* connection) const override; |
205 | 205 |
206 private: | 206 private: |
207 QuicDispatcher* dispatcher_; | 207 QuicDispatcher* dispatcher_; |
208 }; | 208 }; |
209 | 209 |
210 // Called by |framer_visitor_| when the private header has been parsed | 210 // Called by |framer_visitor_| when the private header has been parsed |
211 // of a data packet that is destined for the time wait manager. | 211 // of a data packet that is destined for the time wait manager. |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 QuicFramer framer_; | 263 QuicFramer framer_; |
264 scoped_ptr<QuicFramerVisitor> framer_visitor_; | 264 scoped_ptr<QuicFramerVisitor> framer_visitor_; |
265 | 265 |
266 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher); | 266 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher); |
267 }; | 267 }; |
268 | 268 |
269 } // namespace tools | 269 } // namespace tools |
270 } // namespace net | 270 } // namespace net |
271 | 271 |
272 #endif // NET_TOOLS_QUIC_QUIC_DISPATCHER_H_ | 272 #endif // NET_TOOLS_QUIC_QUIC_DISPATCHER_H_ |
OLD | NEW |