| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 QuicErrorCode error, | 80 QuicErrorCode error, |
| 81 const std::string& error_details) override; | 81 const std::string& error_details) override; |
| 82 | 82 |
| 83 // Queues the blocked writer for later resumption. | 83 // Queues the blocked writer for later resumption. |
| 84 void OnWriteBlocked(QuicBlockedWriterInterface* blocked_writer) override; | 84 void OnWriteBlocked(QuicBlockedWriterInterface* blocked_writer) override; |
| 85 | 85 |
| 86 // Called whenever the time wait list manager adds a new connection to the | 86 // Called whenever the time wait list manager adds a new connection to the |
| 87 // time-wait list. | 87 // time-wait list. |
| 88 void OnConnectionAddedToTimeWaitList(QuicConnectionId connection_id) override; | 88 void OnConnectionAddedToTimeWaitList(QuicConnectionId connection_id) override; |
| 89 | 89 |
| 90 void OnPacketBeingDispatchedToSession( |
| 91 QuicServerSessionBase* session) override {} |
| 92 |
| 90 typedef std::unordered_map<QuicConnectionId, QuicServerSessionBase*> | 93 typedef std::unordered_map<QuicConnectionId, QuicServerSessionBase*> |
| 91 SessionMap; | 94 SessionMap; |
| 92 | 95 |
| 93 const SessionMap& session_map() const { return session_map_; } | 96 const SessionMap& session_map() const { return session_map_; } |
| 94 | 97 |
| 95 // Deletes all sessions on the closed session list and clears the list. | 98 // Deletes all sessions on the closed session list and clears the list. |
| 96 virtual void DeleteSessions(); | 99 virtual void DeleteSessions(); |
| 97 | 100 |
| 98 // The largest packet number we expect to receive with a connection | 101 // The largest packet number we expect to receive with a connection |
| 99 // ID for a connection that is not established yet. The current design will | 102 // ID for a connection that is not established yet. The current design will |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 // A backward counter of how many new sessions can be create within current | 352 // A backward counter of how many new sessions can be create within current |
| 350 // event loop. When reaches 0, it means can't create sessions for now. | 353 // event loop. When reaches 0, it means can't create sessions for now. |
| 351 int16_t new_sessions_allowed_per_event_loop_; | 354 int16_t new_sessions_allowed_per_event_loop_; |
| 352 | 355 |
| 353 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher); | 356 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher); |
| 354 }; | 357 }; |
| 355 | 358 |
| 356 } // namespace net | 359 } // namespace net |
| 357 | 360 |
| 358 #endif // NET_TOOLS_QUIC_QUIC_DISPATCHER_H_ | 361 #endif // NET_TOOLS_QUIC_QUIC_DISPATCHER_H_ |
| OLD | NEW |