| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 void Shutdown(); | 103 void Shutdown(); |
| 104 | 104 |
| 105 // QuicServerSessionVisitor interface implementation: | 105 // QuicServerSessionVisitor interface implementation: |
| 106 // Ensure that the closed connection is cleaned up asynchronously. | 106 // Ensure that the closed connection is cleaned up asynchronously. |
| 107 void OnConnectionClosed(QuicConnectionId connection_id, | 107 void OnConnectionClosed(QuicConnectionId connection_id, |
| 108 QuicErrorCode error) override; | 108 QuicErrorCode error) override; |
| 109 | 109 |
| 110 // Queues the blocked writer for later resumption. | 110 // Queues the blocked writer for later resumption. |
| 111 void OnWriteBlocked(QuicBlockedWriterInterface* blocked_writer) override; | 111 void OnWriteBlocked(QuicBlockedWriterInterface* blocked_writer) override; |
| 112 | 112 |
| 113 // Called whenever the QuicTimeWaitListManager adds a new connection to the |
| 114 // time-wait list. |
| 115 void OnConnectionAddedToTimeWaitList(QuicConnectionId connection_id) override; |
| 116 |
| 117 // Called whenever the QuicTimeWaitListManager removes an old connection from |
| 118 // the time-wait list. |
| 119 void OnConnectionRemovedFromTimeWaitList( |
| 120 QuicConnectionId connection_id) override; |
| 121 |
| 113 typedef base::hash_map<QuicConnectionId, QuicSession*> SessionMap; | 122 typedef base::hash_map<QuicConnectionId, QuicSession*> SessionMap; |
| 114 | 123 |
| 115 // Deletes all sessions on the closed session list and clears the list. | 124 // Deletes all sessions on the closed session list and clears the list. |
| 116 void DeleteSessions(); | 125 void DeleteSessions(); |
| 117 | 126 |
| 118 const SessionMap& session_map() const { return session_map_; } | 127 const SessionMap& session_map() const { return session_map_; } |
| 119 | 128 |
| 120 protected: | 129 protected: |
| 121 // Instantiates a new low-level packet writer. Caller takes ownership of the | 130 // Instantiates a new low-level packet writer. Caller takes ownership of the |
| 122 // returned object. | 131 // returned object. |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 QuicFramer framer_; | 262 QuicFramer framer_; |
| 254 scoped_ptr<QuicFramerVisitor> framer_visitor_; | 263 scoped_ptr<QuicFramerVisitor> framer_visitor_; |
| 255 | 264 |
| 256 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher); | 265 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher); |
| 257 }; | 266 }; |
| 258 | 267 |
| 259 } // namespace tools | 268 } // namespace tools |
| 260 } // namespace net | 269 } // namespace net |
| 261 | 270 |
| 262 #endif // NET_TOOLS_QUIC_QUIC_DISPATCHER_H_ | 271 #endif // NET_TOOLS_QUIC_QUIC_DISPATCHER_H_ |
| OLD | NEW |