| 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 21 matching lines...) Expand all Loading... |
| 32 namespace test { | 32 namespace test { |
| 33 class QuicDispatcherPeer; | 33 class QuicDispatcherPeer; |
| 34 } // namespace test | 34 } // namespace test |
| 35 | 35 |
| 36 class QuicDispatcher : public QuicServerSessionVisitor, | 36 class QuicDispatcher : public QuicServerSessionVisitor, |
| 37 public ProcessPacketInterface, | 37 public ProcessPacketInterface, |
| 38 public QuicBlockedWriterInterface, | 38 public QuicBlockedWriterInterface, |
| 39 public QuicFramerVisitorInterface { | 39 public QuicFramerVisitorInterface { |
| 40 public: | 40 public: |
| 41 // Ideally we'd have a linked_hash_set: the boolean is unused. | 41 // Ideally we'd have a linked_hash_set: the boolean is unused. |
| 42 typedef linked_hash_map<QuicBlockedWriterInterface*, bool> WriteBlockedList; | 42 typedef linked_hash_map<QuicBlockedWriterInterface*, |
| 43 bool, |
| 44 QuicBlockedWriterInterfacePtrHash> |
| 45 WriteBlockedList; |
| 43 | 46 |
| 44 // Due to the way delete_sessions_closure_ is registered, the Dispatcher must | 47 // Due to the way delete_sessions_closure_ is registered, the Dispatcher must |
| 45 // live until server Shutdown. |supported_versions| specifies the std::list | 48 // live until server Shutdown. |supported_versions| specifies the std::list |
| 46 // of supported QUIC versions. Takes ownership of |packet_writer_factory|, | 49 // of supported QUIC versions. Takes ownership of |packet_writer_factory|, |
| 47 // which is used to create per-connection writers. | 50 // which is used to create per-connection writers. |
| 48 QuicDispatcher(const QuicConfig& config, | 51 QuicDispatcher(const QuicConfig& config, |
| 49 const QuicCryptoServerConfig* crypto_config, | 52 const QuicCryptoServerConfig* crypto_config, |
| 50 const QuicVersionVector& supported_versions, | 53 const QuicVersionVector& supported_versions, |
| 51 QuicConnectionHelperInterface* helper); | 54 QuicConnectionHelperInterface* helper); |
| 52 | 55 |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 // The last error set by SetLastError(), which is called by | 259 // The last error set by SetLastError(), which is called by |
| 257 // framer_visitor_->OnError(). | 260 // framer_visitor_->OnError(). |
| 258 QuicErrorCode last_error_; | 261 QuicErrorCode last_error_; |
| 259 | 262 |
| 260 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher); | 263 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher); |
| 261 }; | 264 }; |
| 262 | 265 |
| 263 } // namespace net | 266 } // namespace net |
| 264 | 267 |
| 265 #endif // NET_TOOLS_QUIC_QUIC_DISPATCHER_H_ | 268 #endif // NET_TOOLS_QUIC_QUIC_DISPATCHER_H_ |
| OLD | NEW |