| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 // Due to the way delete_sessions_closure_ is registered, the Dispatcher | 63 // Due to the way delete_sessions_closure_ is registered, the Dispatcher |
| 64 // must live until epoll_server Shutdown. |supported_versions| specifies the | 64 // must live until epoll_server Shutdown. |supported_versions| specifies the |
| 65 // list of supported QUIC versions. | 65 // list of supported QUIC versions. |
| 66 QuicDispatcher(const QuicConfig& config, | 66 QuicDispatcher(const QuicConfig& config, |
| 67 const QuicCryptoServerConfig& crypto_config, | 67 const QuicCryptoServerConfig& crypto_config, |
| 68 const QuicVersionVector& supported_versions, | 68 const QuicVersionVector& supported_versions, |
| 69 QuicConnectionHelperInterface* helper); | 69 QuicConnectionHelperInterface* helper); |
| 70 | 70 |
| 71 virtual ~QuicDispatcher(); | 71 virtual ~QuicDispatcher(); |
| 72 | 72 |
| 73 // Takes ownership of the packet writer | 73 // Takes ownership of the packet writer. |
| 74 virtual void Initialize(QuicServerPacketWriter* writer); | 74 virtual void Initialize(QuicServerPacketWriter* writer); |
| 75 | 75 |
| 76 // Process the incoming packet by creating a new session, passing it to | 76 // Process the incoming packet by creating a new session, passing it to |
| 77 // an existing session, or passing it to the TimeWaitListManager. | 77 // an existing session, or passing it to the TimeWaitListManager. |
| 78 virtual void ProcessPacket(const IPEndPoint& server_address, | 78 virtual void ProcessPacket(const IPEndPoint& server_address, |
| 79 const IPEndPoint& client_address, | 79 const IPEndPoint& client_address, |
| 80 const QuicEncryptedPacket& packet) OVERRIDE; | 80 const QuicEncryptedPacket& packet) OVERRIDE; |
| 81 | 81 |
| 82 // Returns true if there's anything in the blocked writer list. | 82 // Returns true if there's anything in the blocked writer list. |
| 83 virtual bool HasPendingWrites() const; | 83 virtual bool HasPendingWrites() const; |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 | 208 |
| 209 QuicFramer framer_; | 209 QuicFramer framer_; |
| 210 scoped_ptr<QuicFramerVisitor> framer_visitor_; | 210 scoped_ptr<QuicFramerVisitor> framer_visitor_; |
| 211 | 211 |
| 212 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher); | 212 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher); |
| 213 }; | 213 }; |
| 214 | 214 |
| 215 } // namespace net | 215 } // namespace net |
| 216 | 216 |
| 217 #endif // NET_QUIC_QUIC_DISPATCHER_H_ | 217 #endif // NET_QUIC_QUIC_DISPATCHER_H_ |
| OLD | NEW |