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 #include "net/tools/quic/quic_time_wait_list_manager.h" | 5 #include "net/tools/quic/quic_time_wait_list_manager.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 const IPEndPoint server_address_; | 73 const IPEndPoint server_address_; |
74 const IPEndPoint client_address_; | 74 const IPEndPoint client_address_; |
75 scoped_ptr<QuicEncryptedPacket> packet_; | 75 scoped_ptr<QuicEncryptedPacket> packet_; |
76 | 76 |
77 DISALLOW_COPY_AND_ASSIGN(QueuedPacket); | 77 DISALLOW_COPY_AND_ASSIGN(QueuedPacket); |
78 }; | 78 }; |
79 | 79 |
80 QuicTimeWaitListManager::QuicTimeWaitListManager( | 80 QuicTimeWaitListManager::QuicTimeWaitListManager( |
81 QuicPacketWriter* writer, | 81 QuicPacketWriter* writer, |
82 QuicServerSessionVisitor* visitor, | 82 QuicServerSessionVisitor* visitor, |
83 QuicConnectionHelperInterface* helper, | 83 QuicConnectionHelperInterface* helper) |
84 const QuicVersionVector& supported_versions) | |
85 : time_wait_period_( | 84 : time_wait_period_( |
86 QuicTime::Delta::FromSeconds(FLAGS_quic_time_wait_list_seconds)), | 85 QuicTime::Delta::FromSeconds(FLAGS_quic_time_wait_list_seconds)), |
87 connection_id_clean_up_alarm_( | 86 connection_id_clean_up_alarm_( |
88 helper->CreateAlarm(new ConnectionIdCleanUpAlarm(this))), | 87 helper->CreateAlarm(new ConnectionIdCleanUpAlarm(this))), |
89 clock_(helper->GetClock()), | 88 clock_(helper->GetClock()), |
90 writer_(writer), | 89 writer_(writer), |
91 visitor_(visitor) { | 90 visitor_(visitor) { |
92 SetConnectionIdCleanUpAlarm(); | 91 SetConnectionIdCleanUpAlarm(); |
93 } | 92 } |
94 | 93 |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 return; | 306 return; |
308 } | 307 } |
309 while (num_connections() >= | 308 while (num_connections() >= |
310 static_cast<size_t>(FLAGS_quic_time_wait_list_max_connections)) { | 309 static_cast<size_t>(FLAGS_quic_time_wait_list_max_connections)) { |
311 MaybeExpireOldestConnection(QuicTime::Infinite()); | 310 MaybeExpireOldestConnection(QuicTime::Infinite()); |
312 } | 311 } |
313 } | 312 } |
314 | 313 |
315 } // namespace tools | 314 } // namespace tools |
316 } // namespace net | 315 } // namespace net |
OLD | NEW |