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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 | 128 |
129 protected: | 129 protected: |
130 // Instantiates a new low-level packet writer. Caller takes ownership of the | 130 // Instantiates a new low-level packet writer. Caller takes ownership of the |
131 // returned object. | 131 // returned object. |
132 virtual QuicPacketWriter* CreateWriter(int fd); | 132 virtual QuicPacketWriter* CreateWriter(int fd); |
133 | 133 |
134 virtual QuicSession* CreateQuicSession(QuicConnectionId connection_id, | 134 virtual QuicSession* CreateQuicSession(QuicConnectionId connection_id, |
135 const IPEndPoint& server_address, | 135 const IPEndPoint& server_address, |
136 const IPEndPoint& client_address); | 136 const IPEndPoint& client_address); |
137 | 137 |
138 virtual QuicConnection* CreateQuicConnection( | |
139 QuicConnectionId connection_id, | |
140 const IPEndPoint& server_address, | |
141 const IPEndPoint& client_address); | |
142 | |
143 // Called by |framer_visitor_| when the public header has been parsed. | 138 // Called by |framer_visitor_| when the public header has been parsed. |
144 virtual bool OnUnauthenticatedPublicHeader( | 139 virtual bool OnUnauthenticatedPublicHeader( |
145 const QuicPacketPublicHeader& header); | 140 const QuicPacketPublicHeader& header); |
146 | 141 |
147 // Create and return the time wait list manager for this dispatcher, which | 142 // Create and return the time wait list manager for this dispatcher, which |
148 // will be owned by the dispatcher as time_wait_list_manager_ | 143 // will be owned by the dispatcher as time_wait_list_manager_ |
149 virtual QuicTimeWaitListManager* CreateQuicTimeWaitListManager(); | 144 virtual QuicTimeWaitListManager* CreateQuicTimeWaitListManager(); |
150 | 145 |
151 // Replaces the packet writer with |writer|. Takes ownership of |writer|. | 146 // Replaces the packet writer with |writer|. Takes ownership of |writer|. |
152 void set_writer(QuicPacketWriter* writer) { | 147 void set_writer(QuicPacketWriter* writer) { |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 QuicFramer framer_; | 257 QuicFramer framer_; |
263 scoped_ptr<QuicFramerVisitor> framer_visitor_; | 258 scoped_ptr<QuicFramerVisitor> framer_visitor_; |
264 | 259 |
265 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher); | 260 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher); |
266 }; | 261 }; |
267 | 262 |
268 } // namespace tools | 263 } // namespace tools |
269 } // namespace net | 264 } // namespace net |
270 | 265 |
271 #endif // NET_TOOLS_QUIC_QUIC_DISPATCHER_H_ | 266 #endif // NET_TOOLS_QUIC_QUIC_DISPATCHER_H_ |
OLD | NEW |