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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 typedef linked_hash_map<QuicBlockedWriterInterface*, bool> WriteBlockedList; | 55 typedef linked_hash_map<QuicBlockedWriterInterface*, bool> WriteBlockedList; |
56 | 56 |
57 // Due to the way delete_sessions_closure_ is registered, the Dispatcher | 57 // Due to the way delete_sessions_closure_ is registered, the Dispatcher |
58 // must live until epoll_server Shutdown. |supported_versions| specifies the | 58 // must live until epoll_server Shutdown. |supported_versions| specifies the |
59 // list of supported QUIC versions. | 59 // list of supported QUIC versions. |
60 QuicDispatcher(const QuicConfig& config, | 60 QuicDispatcher(const QuicConfig& config, |
61 const QuicCryptoServerConfig& crypto_config, | 61 const QuicCryptoServerConfig& crypto_config, |
62 const QuicVersionVector& supported_versions, | 62 const QuicVersionVector& supported_versions, |
63 int fd, | 63 int fd, |
64 EpollServer* epoll_server); | 64 EpollServer* epoll_server); |
65 virtual ~QuicDispatcher(); | 65 virtual ~QuicDispatcher() OVERRIDE; |
66 | 66 |
67 // QuicPacketWriter | 67 // QuicPacketWriter |
68 virtual WriteResult WritePacket( | 68 virtual WriteResult WritePacket( |
69 const char* buffer, size_t buf_len, | 69 const char* buffer, size_t buf_len, |
70 const IPAddressNumber& self_address, | 70 const IPAddressNumber& self_address, |
71 const IPEndPoint& peer_address, | 71 const IPEndPoint& peer_address, |
72 QuicBlockedWriterInterface* writer) OVERRIDE; | 72 QuicBlockedWriterInterface* writer) OVERRIDE; |
73 virtual bool IsWriteBlockedDataBuffered() const OVERRIDE; | 73 virtual bool IsWriteBlockedDataBuffered() const OVERRIDE; |
74 | 74 |
75 // Process the incoming packet by creating a new session, passing it to | 75 // Process the incoming packet by creating a new session, passing it to |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 QuicFramer framer_; | 199 QuicFramer framer_; |
200 scoped_ptr<QuicFramerVisitor> framer_visitor_; | 200 scoped_ptr<QuicFramerVisitor> framer_visitor_; |
201 | 201 |
202 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher); | 202 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher); |
203 }; | 203 }; |
204 | 204 |
205 } // namespace tools | 205 } // namespace tools |
206 } // namespace net | 206 } // namespace net |
207 | 207 |
208 #endif // NET_TOOLS_QUIC_QUIC_DISPATCHER_H_ | 208 #endif // NET_TOOLS_QUIC_QUIC_DISPATCHER_H_ |
OLD | NEW |