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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 // visitor - the entity that manages blocked writers. (The dispatcher) | 49 // visitor - the entity that manages blocked writers. (The dispatcher) |
50 // epoll_server - used to run clean up alarms. (Owned by the dispatcher) | 50 // epoll_server - used to run clean up alarms. (Owned by the dispatcher) |
51 QuicTimeWaitListManager(QuicPacketWriter* writer, | 51 QuicTimeWaitListManager(QuicPacketWriter* writer, |
52 QuicServerSessionVisitor* visitor, | 52 QuicServerSessionVisitor* visitor, |
53 EpollServer* epoll_server, | 53 EpollServer* epoll_server, |
54 const QuicVersionVector& supported_versions); | 54 const QuicVersionVector& supported_versions); |
55 virtual ~QuicTimeWaitListManager(); | 55 virtual ~QuicTimeWaitListManager(); |
56 | 56 |
57 // Adds the given connection_id to time wait state for kTimeWaitPeriod. | 57 // Adds the given connection_id to time wait state for kTimeWaitPeriod. |
58 // Henceforth, any packet bearing this connection_id should not be processed | 58 // Henceforth, any packet bearing this connection_id should not be processed |
59 // while the connection_id remains in this list. If a non-NULL |close_packet| | 59 // while the connection_id remains in this list. If a non-nullptr |
60 // is provided, it is sent again when packets are received for added | 60 // |close_packet| is provided, it is sent again when packets are received for |
61 // connection_ids. If NULL, a public reset packet is sent with the specified | 61 // added connection_ids. If nullptr, a public reset packet is sent with the |
62 // |version|. DCHECKs that connection_id is not already on the list. | 62 // specified |version|. DCHECKs that connection_id is not already on the list. |
63 void AddConnectionIdToTimeWait(QuicConnectionId connection_id, | 63 void AddConnectionIdToTimeWait(QuicConnectionId connection_id, |
64 QuicVersion version, | 64 QuicVersion version, |
65 QuicEncryptedPacket* close_packet); // Owned. | 65 QuicEncryptedPacket* close_packet); // Owned. |
66 | 66 |
67 // Returns true if the connection_id is in time wait state, false otherwise. | 67 // Returns true if the connection_id is in time wait state, false otherwise. |
68 // Packets received for this connection_id should not lead to creation of new | 68 // Packets received for this connection_id should not lead to creation of new |
69 // QuicSessions. | 69 // QuicSessions. |
70 bool IsConnectionIdInTimeWait(QuicConnectionId connection_id) const; | 70 bool IsConnectionIdInTimeWait(QuicConnectionId connection_id) const; |
71 | 71 |
72 // Called when a packet is received for a connection_id that is in time wait | 72 // Called when a packet is received for a connection_id that is in time wait |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 // Interface that manages blocked writers. | 172 // Interface that manages blocked writers. |
173 QuicServerSessionVisitor* visitor_; | 173 QuicServerSessionVisitor* visitor_; |
174 | 174 |
175 DISALLOW_COPY_AND_ASSIGN(QuicTimeWaitListManager); | 175 DISALLOW_COPY_AND_ASSIGN(QuicTimeWaitListManager); |
176 }; | 176 }; |
177 | 177 |
178 } // namespace tools | 178 } // namespace tools |
179 } // namespace net | 179 } // namespace net |
180 | 180 |
181 #endif // NET_TOOLS_QUIC_QUIC_TIME_WAIT_LIST_MANAGER_H_ | 181 #endif // NET_TOOLS_QUIC_QUIC_TIME_WAIT_LIST_MANAGER_H_ |
OLD | NEW |