Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Side by Side Diff: net/tools/quic/quic_time_wait_list_manager.h

Issue 1036303003: Various formatting changes to shared QUIC server code found while syning with internal version. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 30 matching lines...) Expand all
41 public: 41 public:
42 // writer - the entity that writes to the socket. (Owned by the dispatcher) 42 // writer - the entity that writes to the socket. (Owned by the dispatcher)
43 // visitor - the entity that manages blocked writers. (The dispatcher) 43 // visitor - the entity that manages blocked writers. (The dispatcher)
44 // helper - used to run clean up alarms. (Owned by the dispatcher) 44 // helper - used to run clean up alarms. (Owned by the dispatcher)
45 QuicTimeWaitListManager(QuicPacketWriter* writer, 45 QuicTimeWaitListManager(QuicPacketWriter* writer,
46 QuicServerSessionVisitor* visitor, 46 QuicServerSessionVisitor* visitor,
47 QuicConnectionHelperInterface* helper, 47 QuicConnectionHelperInterface* helper,
48 const QuicVersionVector& supported_versions); 48 const QuicVersionVector& supported_versions);
49 ~QuicTimeWaitListManager() override; 49 ~QuicTimeWaitListManager() override;
50 50
51 // Adds the given connection_id to time wait state for 51 // Adds the given connection_id to time wait state for time_wait_period_.
52 // time_wait_period_. Henceforth, any packet bearing this 52 // Henceforth, any packet bearing this connection_id should not be processed
53 // connection_id should not be processed while the connection_id 53 // while the connection_id remains in this list. If a non-nullptr
54 // remains in this list. If a non-nullptr |close_packet| is 54 // |close_packet| is provided, the TimeWaitListManager takes ownership of it
55 // provided, the TimeWaitListManager takes ownership of it and sends 55 // and sends it again when packets are received for added connection_ids. If
56 // it again when packets are received for added connection_ids. If 56 // nullptr, a public reset packet is sent with the specified |version|.
57 // nullptr, a public reset packet is sent with the specified 57 // DCHECKs that connection_id is not already on the list. "virtual" to
58 // |version|. DCHECKs that connection_id is not already on the list. 58 // override in tests.
59 // virtual to override in tests.
60 virtual void AddConnectionIdToTimeWait(QuicConnectionId connection_id, 59 virtual void AddConnectionIdToTimeWait(QuicConnectionId connection_id,
61 QuicVersion version, 60 QuicVersion version,
62 QuicEncryptedPacket* close_packet); 61 QuicEncryptedPacket* close_packet);
63 62
64 // Returns true if the connection_id is in time wait state, false otherwise. 63 // Returns true if the connection_id is in time wait state, false otherwise.
65 // Packets received for this connection_id should not lead to creation of new 64 // Packets received for this connection_id should not lead to creation of new
66 // QuicSessions. 65 // QuicSessions.
67 bool IsConnectionIdInTimeWait(QuicConnectionId connection_id) const; 66 bool IsConnectionIdInTimeWait(QuicConnectionId connection_id) const;
68 67
69 // Called when a packet is received for a connection_id that is in time wait 68 // Called when a packet is received for a connection_id that is in time wait
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 // Interface that manages blocked writers. 180 // Interface that manages blocked writers.
182 QuicServerSessionVisitor* visitor_; 181 QuicServerSessionVisitor* visitor_;
183 182
184 DISALLOW_COPY_AND_ASSIGN(QuicTimeWaitListManager); 183 DISALLOW_COPY_AND_ASSIGN(QuicTimeWaitListManager);
185 }; 184 };
186 185
187 } // namespace tools 186 } // namespace tools
188 } // namespace net 187 } // namespace net
189 188
190 #endif // NET_TOOLS_QUIC_QUIC_TIME_WAIT_LIST_MANAGER_H_ 189 #endif // NET_TOOLS_QUIC_QUIC_TIME_WAIT_LIST_MANAGER_H_
OLDNEW
« no previous file with comments | « net/tools/quic/quic_spdy_server_stream.cc ('k') | net/tools/quic/quic_time_wait_list_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698