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

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

Issue 839143002: Roll Chrome into Mojo. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Rebase Created 5 years, 11 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
« no previous file with comments | « net/quic/quic_stream_factory_test.cc ('k') | net/quic/quic_time_wait_list_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_QUIC_QUIC_TIME_WAIT_LIST_MANAGER_H_ 9 #ifndef NET_QUIC_QUIC_TIME_WAIT_LIST_MANAGER_H_
10 #define NET_QUIC_QUIC_TIME_WAIT_LIST_MANAGER_H_ 10 #define NET_QUIC_QUIC_TIME_WAIT_LIST_MANAGER_H_
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 void OnCanWrite() override; 82 void OnCanWrite() override;
83 83
84 // Used to delete connection_id entries that have outlived their time wait 84 // Used to delete connection_id entries that have outlived their time wait
85 // period. 85 // period.
86 void CleanUpOldConnectionIds(); 86 void CleanUpOldConnectionIds();
87 87
88 // Given a ConnectionId that exists in the time wait list, returns the 88 // Given a ConnectionId that exists in the time wait list, returns the
89 // QuicVersion associated with it. 89 // QuicVersion associated with it.
90 QuicVersion GetQuicVersionFromConnectionId(QuicConnectionId connection_id); 90 QuicVersion GetQuicVersionFromConnectionId(QuicConnectionId connection_id);
91 91
92 // The number of connections on the time-wait list.
93 size_t num_connections() const { return connection_id_map_.size(); }
94
92 protected: 95 protected:
93 virtual QuicEncryptedPacket* BuildPublicReset( 96 virtual QuicEncryptedPacket* BuildPublicReset(
94 const QuicPublicResetPacket& packet); 97 const QuicPublicResetPacket& packet);
95 98
96 private: 99 private:
97 friend class test::QuicTimeWaitListManagerPeer; 100 friend class test::QuicTimeWaitListManagerPeer;
98 101
99 // Internal structure to store pending public reset packets. 102 // Internal structure to store pending public reset packets.
100 class QueuedPacket; 103 class QueuedPacket;
101 104
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 168
166 // Interface that manages blocked writers. 169 // Interface that manages blocked writers.
167 QuicServerSessionVisitor* visitor_; 170 QuicServerSessionVisitor* visitor_;
168 171
169 DISALLOW_COPY_AND_ASSIGN(QuicTimeWaitListManager); 172 DISALLOW_COPY_AND_ASSIGN(QuicTimeWaitListManager);
170 }; 173 };
171 174
172 } // namespace net 175 } // namespace net
173 176
174 #endif // NET_QUIC_QUIC_TIME_WAIT_LIST_MANAGER_H_ 177 #endif // NET_QUIC_QUIC_TIME_WAIT_LIST_MANAGER_H_
OLDNEW
« no previous file with comments | « net/quic/quic_stream_factory_test.cc ('k') | net/quic/quic_time_wait_list_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698