| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 // Ensure that the closed connection is cleaned up asynchronously. | 78 // Ensure that the closed connection is cleaned up asynchronously. |
| 79 void OnConnectionClosed(QuicConnectionId connection_id, | 79 void OnConnectionClosed(QuicConnectionId connection_id, |
| 80 QuicErrorCode error, | 80 QuicErrorCode error, |
| 81 const std::string& error_details) override; | 81 const std::string& error_details) override; |
| 82 | 82 |
| 83 // QuicSession::Visitor interface implementation (via inheritance of | 83 // QuicSession::Visitor interface implementation (via inheritance of |
| 84 // QuicTimeWaitListManager::Visitor): | 84 // QuicTimeWaitListManager::Visitor): |
| 85 // Queues the blocked writer for later resumption. | 85 // Queues the blocked writer for later resumption. |
| 86 void OnWriteBlocked(QuicBlockedWriterInterface* blocked_writer) override; | 86 void OnWriteBlocked(QuicBlockedWriterInterface* blocked_writer) override; |
| 87 | 87 |
| 88 // QuicSession::Visitor interface implementation (via inheritance of | |
| 89 // QuicTimeWaitListManager::Visitor): | |
| 90 // Collects reset error code received on streams. | |
| 91 void OnRstStreamReceived(const QuicRstStreamFrame& frame) override; | |
| 92 | |
| 93 // QuicTimeWaitListManager::Visitor interface implementation | 88 // QuicTimeWaitListManager::Visitor interface implementation |
| 94 // Called whenever the time wait list manager adds a new connection to the | 89 // Called whenever the time wait list manager adds a new connection to the |
| 95 // time-wait list. | 90 // time-wait list. |
| 96 void OnConnectionAddedToTimeWaitList(QuicConnectionId connection_id) override; | 91 void OnConnectionAddedToTimeWaitList(QuicConnectionId connection_id) override; |
| 97 | 92 |
| 98 using SessionMap = | 93 using SessionMap = |
| 99 std::unordered_map<QuicConnectionId, std::unique_ptr<QuicSession>>; | 94 std::unordered_map<QuicConnectionId, std::unique_ptr<QuicSession>>; |
| 100 | 95 |
| 101 const SessionMap& session_map() const { return session_map_; } | 96 const SessionMap& session_map() const { return session_map_; } |
| 102 | 97 |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 // A backward counter of how many new sessions can be create within current | 384 // A backward counter of how many new sessions can be create within current |
| 390 // event loop. When reaches 0, it means can't create sessions for now. | 385 // event loop. When reaches 0, it means can't create sessions for now. |
| 391 int16_t new_sessions_allowed_per_event_loop_; | 386 int16_t new_sessions_allowed_per_event_loop_; |
| 392 | 387 |
| 393 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher); | 388 DISALLOW_COPY_AND_ASSIGN(QuicDispatcher); |
| 394 }; | 389 }; |
| 395 | 390 |
| 396 } // namespace net | 391 } // namespace net |
| 397 | 392 |
| 398 #endif // NET_TOOLS_QUIC_QUIC_DISPATCHER_H_ | 393 #endif // NET_TOOLS_QUIC_QUIC_DISPATCHER_H_ |
| OLD | NEW |