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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 class DeleteSessionsAlarm; | 46 class DeleteSessionsAlarm; |
47 | 47 |
48 class ProcessPacketInterface { | 48 class ProcessPacketInterface { |
49 public: | 49 public: |
50 virtual ~ProcessPacketInterface() {} | 50 virtual ~ProcessPacketInterface() {} |
51 virtual void ProcessPacket(const IPEndPoint& server_address, | 51 virtual void ProcessPacket(const IPEndPoint& server_address, |
52 const IPEndPoint& client_address, | 52 const IPEndPoint& client_address, |
53 const QuicEncryptedPacket& packet) = 0; | 53 const QuicEncryptedPacket& packet) = 0; |
54 }; | 54 }; |
55 | 55 |
56 class QuicDispatcher : public QuicBlockedWriterInterface, | 56 class NET_EXPORT_PRIVATE QuicDispatcher : public QuicBlockedWriterInterface, |
57 public QuicServerSessionVisitor, | 57 public QuicServerSessionVisitor, |
58 public ProcessPacketInterface { | 58 public ProcessPacketInterface { |
59 public: | 59 public: |
60 // Ideally we'd have a linked_hash_set: the boolean is unused. | 60 // Ideally we'd have a linked_hash_set: the boolean is unused. |
61 typedef linked_hash_map<QuicBlockedWriterInterface*, bool> WriteBlockedList; | 61 typedef linked_hash_map<QuicBlockedWriterInterface*, bool> WriteBlockedList; |
62 | 62 |
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, |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 | 221 |
222 QuicFramer framer_; | 222 QuicFramer framer_; |
223 scoped_ptr<QuicFramerVisitor> framer_visitor_; | 223 scoped_ptr<QuicFramerVisitor> framer_visitor_; |
224 | 224 |
225 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher); | 225 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher); |
226 }; | 226 }; |
227 | 227 |
228 } // namespace net | 228 } // namespace net |
229 | 229 |
230 #endif // NET_QUIC_QUIC_DISPATCHER_H_ | 230 #endif // NET_QUIC_QUIC_DISPATCHER_H_ |
OLD | NEW |