| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 // QuicSessions. | 78 // QuicSessions. |
| 79 bool IsConnectionIdInTimeWait(QuicConnectionId connection_id) const; | 79 bool IsConnectionIdInTimeWait(QuicConnectionId connection_id) const; |
| 80 | 80 |
| 81 // Called when a packet is received for a connection_id that is in time wait | 81 // Called when a packet is received for a connection_id that is in time wait |
| 82 // state. Sends a public reset packet to the client which sent this | 82 // state. Sends a public reset packet to the client which sent this |
| 83 // connection_id. Sending of the public reset packet is throttled by using | 83 // connection_id. Sending of the public reset packet is throttled by using |
| 84 // exponential back off. DCHECKs for the connection_id to be in time wait | 84 // exponential back off. DCHECKs for the connection_id to be in time wait |
| 85 // state. virtual to override in tests. | 85 // state. virtual to override in tests. |
| 86 virtual void ProcessPacket(const QuicSocketAddress& server_address, | 86 virtual void ProcessPacket(const QuicSocketAddress& server_address, |
| 87 const QuicSocketAddress& client_address, | 87 const QuicSocketAddress& client_address, |
| 88 QuicConnectionId connection_id, | 88 QuicConnectionId connection_id); |
| 89 const QuicEncryptedPacket& packet); | |
| 90 | 89 |
| 91 // Called by the dispatcher when the underlying socket becomes writable again, | 90 // Called by the dispatcher when the underlying socket becomes writable again, |
| 92 // since we might need to send pending public reset packets which we didn't | 91 // since we might need to send pending public reset packets which we didn't |
| 93 // send because the underlying socket was write blocked. | 92 // send because the underlying socket was write blocked. |
| 94 void OnCanWrite() override; | 93 void OnCanWrite() override; |
| 95 | 94 |
| 96 // Used to delete connection_id entries that have outlived their time wait | 95 // Used to delete connection_id entries that have outlived their time wait |
| 97 // period. | 96 // period. |
| 98 void CleanUpOldConnectionIds(); | 97 void CleanUpOldConnectionIds(); |
| 99 | 98 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 | 202 |
| 204 // Interface that manages blocked writers. | 203 // Interface that manages blocked writers. |
| 205 Visitor* visitor_; | 204 Visitor* visitor_; |
| 206 | 205 |
| 207 DISALLOW_COPY_AND_ASSIGN(QuicTimeWaitListManager); | 206 DISALLOW_COPY_AND_ASSIGN(QuicTimeWaitListManager); |
| 208 }; | 207 }; |
| 209 | 208 |
| 210 } // namespace net | 209 } // namespace net |
| 211 | 210 |
| 212 #endif // NET_TOOLS_QUIC_QUIC_TIME_WAIT_LIST_MANAGER_H_ | 211 #endif // NET_TOOLS_QUIC_QUIC_TIME_WAIT_LIST_MANAGER_H_ |
| OLD | NEW |