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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 QuicPacketWriter* Create(QuicConnection* connection) const override; | 219 QuicPacketWriter* Create(QuicConnection* connection) const override; |
220 | 220 |
221 private: | 221 private: |
222 QuicDispatcher* dispatcher_; | 222 QuicDispatcher* dispatcher_; |
223 }; | 223 }; |
224 | 224 |
225 // Called by |framer_visitor_| when the private header has been parsed | 225 // Called by |framer_visitor_| when the private header has been parsed |
226 // of a data packet that is destined for the time wait manager. | 226 // of a data packet that is destined for the time wait manager. |
227 void OnUnauthenticatedHeader(const QuicPacketHeader& header); | 227 void OnUnauthenticatedHeader(const QuicPacketHeader& header); |
228 | 228 |
229 // Removes the session from the session map and write blocked list, and | 229 // Removes the session from the session map and write blocked list, and adds |
230 // adds the ConnectionId to the time-wait list. | 230 // the ConnectionId to the time-wait list. If |session_closed_statelessly| is |
231 void CleanUpSession(SessionMap::iterator it); | 231 // true, any future packets for the ConnectionId will be black-holed. |
| 232 void CleanUpSession(SessionMap::iterator it, bool session_closed_statelessly); |
232 | 233 |
233 bool HandlePacketForTimeWait(const QuicPacketPublicHeader& header); | 234 bool HandlePacketForTimeWait(const QuicPacketPublicHeader& header); |
234 | 235 |
235 const QuicConfig& config_; | 236 const QuicConfig& config_; |
236 | 237 |
237 const QuicCryptoServerConfig* crypto_config_; | 238 const QuicCryptoServerConfig* crypto_config_; |
238 | 239 |
239 // The list of connections waiting to write. | 240 // The list of connections waiting to write. |
240 WriteBlockedList write_blocked_list_; | 241 WriteBlockedList write_blocked_list_; |
241 | 242 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 QuicFramer framer_; | 277 QuicFramer framer_; |
277 scoped_ptr<QuicFramerVisitor> framer_visitor_; | 278 scoped_ptr<QuicFramerVisitor> framer_visitor_; |
278 | 279 |
279 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher); | 280 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher); |
280 }; | 281 }; |
281 | 282 |
282 } // namespace tools | 283 } // namespace tools |
283 } // namespace net | 284 } // namespace net |
284 | 285 |
285 #endif // NET_TOOLS_QUIC_QUIC_DISPATCHER_H_ | 286 #endif // NET_TOOLS_QUIC_QUIC_DISPATCHER_H_ |
OLD | NEW |