| 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 // the size is under the configured maximum. | 91 // the size is under the configured maximum. |
| 92 void TrimTimeWaitListIfNeeded(); | 92 void TrimTimeWaitListIfNeeded(); |
| 93 | 93 |
| 94 // Given a ConnectionId that exists in the time wait list, returns the | 94 // Given a ConnectionId that exists in the time wait list, returns the |
| 95 // QuicVersion associated with it. | 95 // QuicVersion associated with it. |
| 96 QuicVersion GetQuicVersionFromConnectionId(QuicConnectionId connection_id); | 96 QuicVersion GetQuicVersionFromConnectionId(QuicConnectionId connection_id); |
| 97 | 97 |
| 98 // The number of connections on the time-wait list. | 98 // The number of connections on the time-wait list. |
| 99 size_t num_connections() const { return connection_id_map_.size(); } | 99 size_t num_connections() const { return connection_id_map_.size(); } |
| 100 | 100 |
| 101 // Sends a version negotiation packet for |connection_id| announcing support |
| 102 // for |supported_versions| to |client_address| from |server_address|. |
| 103 virtual void SendVersionNegotiationPacket( |
| 104 QuicConnectionId connection_id, |
| 105 const QuicVersionVector& supported_versions, |
| 106 const IPEndPoint& server_address, |
| 107 const IPEndPoint& client_address); |
| 108 |
| 101 protected: | 109 protected: |
| 102 virtual QuicEncryptedPacket* BuildPublicReset( | 110 virtual QuicEncryptedPacket* BuildPublicReset( |
| 103 const QuicPublicResetPacket& packet); | 111 const QuicPublicResetPacket& packet); |
| 104 | 112 |
| 105 private: | 113 private: |
| 106 friend class test::QuicTimeWaitListManagerPeer; | 114 friend class test::QuicTimeWaitListManagerPeer; |
| 107 | 115 |
| 108 // Internal structure to store pending public reset packets. | 116 // Internal structure to store pending public reset packets. |
| 109 class QueuedPacket; | 117 class QueuedPacket; |
| 110 | 118 |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 | 190 |
| 183 // Interface that manages blocked writers. | 191 // Interface that manages blocked writers. |
| 184 QuicServerSessionVisitor* visitor_; | 192 QuicServerSessionVisitor* visitor_; |
| 185 | 193 |
| 186 DISALLOW_COPY_AND_ASSIGN(QuicTimeWaitListManager); | 194 DISALLOW_COPY_AND_ASSIGN(QuicTimeWaitListManager); |
| 187 }; | 195 }; |
| 188 | 196 |
| 189 } // namespace net | 197 } // namespace net |
| 190 | 198 |
| 191 #endif // NET_TOOLS_QUIC_QUIC_TIME_WAIT_LIST_MANAGER_H_ | 199 #endif // NET_TOOLS_QUIC_QUIC_TIME_WAIT_LIST_MANAGER_H_ |
| OLD | NEW |