| 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 guids in time wait state by discarding the packet and | 5 // Handles packets for guids in time wait state by discarding the packet and |
| 6 // sending the clients a public reset packet with exponential backoff. | 6 // sending the clients a public reset packet with exponential backoff. |
| 7 | 7 |
| 8 #ifndef NET_TOOLS_QUIC_QUIC_TIME_WAIT_LIST_MANAGER_H_ | 8 #ifndef NET_TOOLS_QUIC_QUIC_TIME_WAIT_LIST_MANAGER_H_ |
| 9 #define NET_TOOLS_QUIC_QUIC_TIME_WAIT_LIST_MANAGER_H_ | 9 #define NET_TOOLS_QUIC_QUIC_TIME_WAIT_LIST_MANAGER_H_ |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 // with the guid in time wait state. After the guid expires its time wait | 36 // with the guid in time wait state. After the guid expires its time wait |
| 37 // period, a new connection/session will be created if a packet is received | 37 // period, a new connection/session will be created if a packet is received |
| 38 // for this guid. | 38 // for this guid. |
| 39 class QuicTimeWaitListManager : public QuicBlockedWriterInterface { | 39 class QuicTimeWaitListManager : public QuicBlockedWriterInterface { |
| 40 public: | 40 public: |
| 41 // writer - the entity that writes to the socket. (Owned by the dispatcher) | 41 // writer - the entity that writes to the socket. (Owned by the dispatcher) |
| 42 // epoll_server - used to run clean up alarms. (Owned by the dispatcher) | 42 // epoll_server - used to run clean up alarms. (Owned by the dispatcher) |
| 43 QuicTimeWaitListManager(QuicPacketWriter* writer, | 43 QuicTimeWaitListManager(QuicPacketWriter* writer, |
| 44 EpollServer* epoll_server, | 44 EpollServer* epoll_server, |
| 45 const QuicVersionVector& supported_versions); | 45 const QuicVersionVector& supported_versions); |
| 46 virtual ~QuicTimeWaitListManager(); | 46 virtual ~QuicTimeWaitListManager() OVERRIDE; |
| 47 | 47 |
| 48 // Adds the given guid to time wait state for kTimeWaitPeriod. Henceforth, | 48 // Adds the given guid to time wait state for kTimeWaitPeriod. Henceforth, |
| 49 // any packet bearing this guid should not be processed while the guid remains | 49 // any packet bearing this guid should not be processed while the guid remains |
| 50 // in this list. If a non-NULL |close_packet| is provided, it is sent again | 50 // in this list. If a non-NULL |close_packet| is provided, it is sent again |
| 51 // when packets are received for added guids. If NULL, a public reset packet | 51 // when packets are received for added guids. If NULL, a public reset packet |
| 52 // is sent with the specified |version|. DCHECKs that guid is not already on | 52 // is sent with the specified |version|. DCHECKs that guid is not already on |
| 53 // the list. | 53 // the list. |
| 54 void AddGuidToTimeWait(QuicGuid guid, | 54 void AddGuidToTimeWait(QuicGuid guid, |
| 55 QuicVersion version, | 55 QuicVersion version, |
| 56 QuicEncryptedPacket* close_packet); // Owned. | 56 QuicEncryptedPacket* close_packet); // Owned. |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 // on sendmsg. | 157 // on sendmsg. |
| 158 bool is_write_blocked_; | 158 bool is_write_blocked_; |
| 159 | 159 |
| 160 DISALLOW_COPY_AND_ASSIGN(QuicTimeWaitListManager); | 160 DISALLOW_COPY_AND_ASSIGN(QuicTimeWaitListManager); |
| 161 }; | 161 }; |
| 162 | 162 |
| 163 } // namespace tools | 163 } // namespace tools |
| 164 } // namespace net | 164 } // namespace net |
| 165 | 165 |
| 166 #endif // NET_TOOLS_QUIC_QUIC_TIME_WAIT_LIST_MANAGER_H_ | 166 #endif // NET_TOOLS_QUIC_QUIC_TIME_WAIT_LIST_MANAGER_H_ |
| OLD | NEW |