| 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 // Handles packets for connection_ids in time wait state by discarding the | 5 // Handles packets for connection_ids in time wait state by discarding the |
| 6 // packet and sending the clients a public reset packet with exponential | 6 // packet and sending the clients a public reset packet with exponential |
| 7 // backoff. | 7 // backoff. |
| 8 | 8 |
| 9 #ifndef NET_TOOLS_QUIC_QUIC_TIME_WAIT_LIST_MANAGER_H_ | 9 #ifndef NET_TOOLS_QUIC_QUIC_TIME_WAIT_LIST_MANAGER_H_ |
| 10 #define NET_TOOLS_QUIC_QUIC_TIME_WAIT_LIST_MANAGER_H_ | 10 #define NET_TOOLS_QUIC_QUIC_TIME_WAIT_LIST_MANAGER_H_ |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 void OnCanWrite() override; | 86 void OnCanWrite() override; |
| 87 | 87 |
| 88 // Used to delete connection_id entries that have outlived their time wait | 88 // Used to delete connection_id entries that have outlived their time wait |
| 89 // period. | 89 // period. |
| 90 void CleanUpOldConnectionIds(); | 90 void CleanUpOldConnectionIds(); |
| 91 | 91 |
| 92 // Given a ConnectionId that exists in the time wait list, returns the | 92 // Given a ConnectionId that exists in the time wait list, returns the |
| 93 // QuicVersion associated with it. | 93 // QuicVersion associated with it. |
| 94 QuicVersion GetQuicVersionFromConnectionId(QuicConnectionId connection_id); | 94 QuicVersion GetQuicVersionFromConnectionId(QuicConnectionId connection_id); |
| 95 | 95 |
| 96 // The number of connections on the time-wait list. |
| 97 size_t num_connections() const { return connection_id_map_.size(); } |
| 98 |
| 96 protected: | 99 protected: |
| 97 virtual QuicEncryptedPacket* BuildPublicReset( | 100 virtual QuicEncryptedPacket* BuildPublicReset( |
| 98 const QuicPublicResetPacket& packet); | 101 const QuicPublicResetPacket& packet); |
| 99 | 102 |
| 100 private: | 103 private: |
| 101 friend class test::QuicTimeWaitListManagerPeer; | 104 friend class test::QuicTimeWaitListManagerPeer; |
| 102 | 105 |
| 103 // Internal structure to store pending public reset packets. | 106 // Internal structure to store pending public reset packets. |
| 104 class QueuedPacket; | 107 class QueuedPacket; |
| 105 | 108 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 // Interface that manages blocked writers. | 175 // Interface that manages blocked writers. |
| 173 QuicServerSessionVisitor* visitor_; | 176 QuicServerSessionVisitor* visitor_; |
| 174 | 177 |
| 175 DISALLOW_COPY_AND_ASSIGN(QuicTimeWaitListManager); | 178 DISALLOW_COPY_AND_ASSIGN(QuicTimeWaitListManager); |
| 176 }; | 179 }; |
| 177 | 180 |
| 178 } // namespace tools | 181 } // namespace tools |
| 179 } // namespace net | 182 } // namespace net |
| 180 | 183 |
| 181 #endif // NET_TOOLS_QUIC_QUIC_TIME_WAIT_LIST_MANAGER_H_ | 184 #endif // NET_TOOLS_QUIC_QUIC_TIME_WAIT_LIST_MANAGER_H_ |
| OLD | NEW |