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/containers/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 private: | 85 private: |
86 const IPEndPoint server_address_; | 86 const IPEndPoint server_address_; |
87 const IPEndPoint client_address_; | 87 const IPEndPoint client_address_; |
88 scoped_ptr<QuicEncryptedPacket> packet_; | 88 scoped_ptr<QuicEncryptedPacket> packet_; |
89 | 89 |
90 DISALLOW_COPY_AND_ASSIGN(QueuedPacket); | 90 DISALLOW_COPY_AND_ASSIGN(QueuedPacket); |
91 }; | 91 }; |
92 | 92 |
93 QuicTimeWaitListManager::QuicTimeWaitListManager( | 93 QuicTimeWaitListManager::QuicTimeWaitListManager( |
94 QuicPacketWriter* writer, | 94 QuicPacketWriter* writer, |
95 EpollServer* epoll_server) | 95 EpollServer* epoll_server, |
96 : framer_(QuicVersionMax(), | 96 const QuicVersionVector& supported_versions) |
| 97 : framer_(supported_versions, |
97 QuicTime::Zero(), // unused | 98 QuicTime::Zero(), // unused |
98 true), | 99 true), |
99 epoll_server_(epoll_server), | 100 epoll_server_(epoll_server), |
100 kTimeWaitPeriod_(QuicTime::Delta::FromSeconds(kTimeWaitSeconds)), | 101 kTimeWaitPeriod_(QuicTime::Delta::FromSeconds(kTimeWaitSeconds)), |
101 guid_clean_up_alarm_(new GuidCleanUpAlarm(this)), | 102 guid_clean_up_alarm_(new GuidCleanUpAlarm(this)), |
102 clock_(epoll_server), | 103 clock_(epoll_server), |
103 writer_(writer), | 104 writer_(writer), |
104 is_write_blocked_(false) { | 105 is_write_blocked_(false) { |
105 framer_.set_visitor(this); | 106 framer_.set_visitor(this); |
106 SetGuidCleanUpAlarm(); | 107 SetGuidCleanUpAlarm(); |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 // This guid has lived its age, retire it now. | 311 // This guid has lived its age, retire it now. |
311 guid_map_.erase(oldest_guid->guid); | 312 guid_map_.erase(oldest_guid->guid); |
312 time_ordered_guid_list_.pop_front(); | 313 time_ordered_guid_list_.pop_front(); |
313 delete oldest_guid; | 314 delete oldest_guid; |
314 } | 315 } |
315 SetGuidCleanUpAlarm(); | 316 SetGuidCleanUpAlarm(); |
316 } | 317 } |
317 | 318 |
318 } // namespace tools | 319 } // namespace tools |
319 } // namespace net | 320 } // namespace net |
OLD | NEW |