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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 void OnCanWrite() override; | 101 void OnCanWrite() override; |
102 | 102 |
103 // QuicServerSessionVisitor interface implementation: | 103 // QuicServerSessionVisitor interface implementation: |
104 // Ensure that the closed connection is cleaned up asynchronously. | 104 // Ensure that the closed connection is cleaned up asynchronously. |
105 void OnConnectionClosed(QuicConnectionId connection_id, | 105 void OnConnectionClosed(QuicConnectionId connection_id, |
106 QuicErrorCode error) override; | 106 QuicErrorCode error) override; |
107 | 107 |
108 // Queues the blocked writer for later resumption. | 108 // Queues the blocked writer for later resumption. |
109 void OnWriteBlocked(QuicBlockedWriterInterface* blocked_writer) override; | 109 void OnWriteBlocked(QuicBlockedWriterInterface* blocked_writer) override; |
110 | 110 |
| 111 // Called whenever the QuicTimeWaitListManager adds a new connection to the |
| 112 // time-wait list. |
| 113 void OnConnectionAddedToTimeWaitList(QuicConnectionId connection_id) override; |
| 114 |
| 115 // Called whenever the QuicTimeWaitListManager removes an old connection from |
| 116 // the time-wait list. |
| 117 void OnConnectionRemovedFromTimeWaitList( |
| 118 QuicConnectionId connection_id) override; |
| 119 |
111 typedef base::hash_map<QuicConnectionId, QuicSession*> SessionMap; | 120 typedef base::hash_map<QuicConnectionId, QuicSession*> SessionMap; |
112 | 121 |
113 // Deletes all sessions on the closed session list and clears the list. | 122 // Deletes all sessions on the closed session list and clears the list. |
114 void DeleteSessions(); | 123 void DeleteSessions(); |
115 | 124 |
116 const SessionMap& session_map() const { return session_map_; } | 125 const SessionMap& session_map() const { return session_map_; } |
117 | 126 |
118 protected: | 127 protected: |
119 virtual QuicSession* CreateQuicSession(QuicConnectionId connection_id, | 128 virtual QuicSession* CreateQuicSession(QuicConnectionId connection_id, |
120 const IPEndPoint& server_address, | 129 const IPEndPoint& server_address, |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 | 251 |
243 QuicFramer framer_; | 252 QuicFramer framer_; |
244 scoped_ptr<QuicFramerVisitor> framer_visitor_; | 253 scoped_ptr<QuicFramerVisitor> framer_visitor_; |
245 | 254 |
246 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher); | 255 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher); |
247 }; | 256 }; |
248 | 257 |
249 } // namespace net | 258 } // namespace net |
250 | 259 |
251 #endif // NET_QUIC_QUIC_DISPATCHER_H_ | 260 #endif // NET_QUIC_QUIC_DISPATCHER_H_ |
OLD | NEW |