| 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 const IPEndPoint& client_address, | 181 const IPEndPoint& client_address, |
| 182 QuicGuid guid, | 182 QuicGuid guid, |
| 183 QuicPacketSequenceNumber rejected_sequence_number) { | 183 QuicPacketSequenceNumber rejected_sequence_number) { |
| 184 QuicPublicResetPacket packet; | 184 QuicPublicResetPacket packet; |
| 185 packet.public_header.guid = guid; | 185 packet.public_header.guid = guid; |
| 186 packet.public_header.reset_flag = true; | 186 packet.public_header.reset_flag = true; |
| 187 packet.public_header.version_flag = false; | 187 packet.public_header.version_flag = false; |
| 188 packet.rejected_sequence_number = rejected_sequence_number; | 188 packet.rejected_sequence_number = rejected_sequence_number; |
| 189 // TODO(satyamshekhar): generate a valid nonce for this guid. | 189 // TODO(satyamshekhar): generate a valid nonce for this guid. |
| 190 packet.nonce_proof = 1010101; | 190 packet.nonce_proof = 1010101; |
| 191 packet.client_address = client_address; |
| 191 QueuedPacket* queued_packet = new QueuedPacket( | 192 QueuedPacket* queued_packet = new QueuedPacket( |
| 192 server_address, | 193 server_address, |
| 193 client_address, | 194 client_address, |
| 194 QuicFramer::BuildPublicResetPacket(packet)); | 195 QuicFramer::BuildPublicResetPacket(packet)); |
| 195 // Takes ownership of the packet. | 196 // Takes ownership of the packet. |
| 196 SendOrQueuePacket(queued_packet); | 197 SendOrQueuePacket(queued_packet); |
| 197 } | 198 } |
| 198 | 199 |
| 199 // Either sends the packet and deletes it or makes pending queue the | 200 // Either sends the packet and deletes it or makes pending queue the |
| 200 // owner of the packet. | 201 // owner of the packet. |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 } | 264 } |
| 264 // This guid has lived its age, retire it now. | 265 // This guid has lived its age, retire it now. |
| 265 delete it->second.close_packet; | 266 delete it->second.close_packet; |
| 266 guid_map_.erase(it); | 267 guid_map_.erase(it); |
| 267 } | 268 } |
| 268 SetGuidCleanUpAlarm(); | 269 SetGuidCleanUpAlarm(); |
| 269 } | 270 } |
| 270 | 271 |
| 271 } // namespace tools | 272 } // namespace tools |
| 272 } // namespace net | 273 } // namespace net |
| OLD | NEW |