OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_QUIC_QUIC_DISPATCHER_H_ | 8 #ifndef NET_QUIC_QUIC_DISPATCHER_H_ |
9 #define NET_QUIC_QUIC_DISPATCHER_H_ | 9 #define NET_QUIC_QUIC_DISPATCHER_H_ |
10 | 10 |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 private: | 183 private: |
184 class QuicFramerVisitor; | 184 class QuicFramerVisitor; |
185 friend class net::test::QuicDispatcherPeer; | 185 friend class net::test::QuicDispatcherPeer; |
186 | 186 |
187 // An adapter that creates packet writers using the dispatcher's | 187 // An adapter that creates packet writers using the dispatcher's |
188 // PacketWriterFactory and shared writer. Essentially, it just curries the | 188 // PacketWriterFactory and shared writer. Essentially, it just curries the |
189 // writer argument away from QuicDispatcher::PacketWriterFactory. | 189 // writer argument away from QuicDispatcher::PacketWriterFactory. |
190 class PacketWriterFactoryAdapter : | 190 class PacketWriterFactoryAdapter : |
191 public QuicConnection::PacketWriterFactory { | 191 public QuicConnection::PacketWriterFactory { |
192 public: | 192 public: |
193 PacketWriterFactoryAdapter(QuicDispatcher* dispatcher); | 193 explicit PacketWriterFactoryAdapter(QuicDispatcher* dispatcher); |
194 ~PacketWriterFactoryAdapter() override; | 194 ~PacketWriterFactoryAdapter() override; |
195 | 195 |
196 QuicPacketWriter* Create(QuicConnection* connection) const override; | 196 QuicPacketWriter* Create(QuicConnection* connection) const override; |
197 | 197 |
198 private: | 198 private: |
199 QuicDispatcher* dispatcher_; | 199 QuicDispatcher* dispatcher_; |
200 }; | 200 }; |
201 | 201 |
202 // Called by |framer_visitor_| when the private header has been parsed | 202 // Called by |framer_visitor_| when the private header has been parsed |
203 // of a data packet that is destined for the time wait manager. | 203 // of a data packet that is destined for the time wait manager. |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 | 252 |
253 QuicFramer framer_; | 253 QuicFramer framer_; |
254 scoped_ptr<QuicFramerVisitor> framer_visitor_; | 254 scoped_ptr<QuicFramerVisitor> framer_visitor_; |
255 | 255 |
256 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher); | 256 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher); |
257 }; | 257 }; |
258 | 258 |
259 } // namespace net | 259 } // namespace net |
260 | 260 |
261 #endif // NET_QUIC_QUIC_DISPATCHER_H_ | 261 #endif // NET_QUIC_QUIC_DISPATCHER_H_ |
OLD | NEW |