| 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 <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 | 199 |
| 200 void QuicTimeWaitListManager::SendPublicReset( | 200 void QuicTimeWaitListManager::SendPublicReset( |
| 201 const QuicSocketAddress& server_address, | 201 const QuicSocketAddress& server_address, |
| 202 const QuicSocketAddress& client_address, | 202 const QuicSocketAddress& client_address, |
| 203 QuicConnectionId connection_id, | 203 QuicConnectionId connection_id, |
| 204 QuicPacketNumber rejected_packet_number) { | 204 QuicPacketNumber rejected_packet_number) { |
| 205 QuicPublicResetPacket packet; | 205 QuicPublicResetPacket packet; |
| 206 packet.public_header.connection_id = connection_id; | 206 packet.public_header.connection_id = connection_id; |
| 207 packet.public_header.reset_flag = true; | 207 packet.public_header.reset_flag = true; |
| 208 packet.public_header.version_flag = false; | 208 packet.public_header.version_flag = false; |
| 209 packet.rejected_packet_number = rejected_packet_number; | |
| 210 // TODO(satyamshekhar): generate a valid nonce for this connection_id. | 209 // TODO(satyamshekhar): generate a valid nonce for this connection_id. |
| 211 packet.nonce_proof = 1010101; | 210 packet.nonce_proof = 1010101; |
| 212 packet.client_address = client_address; | 211 packet.client_address = client_address; |
| 213 // Takes ownership of the packet. | 212 // Takes ownership of the packet. |
| 214 SendOrQueuePacket(QuicMakeUnique<QueuedPacket>(server_address, client_address, | 213 SendOrQueuePacket(QuicMakeUnique<QueuedPacket>(server_address, client_address, |
| 215 BuildPublicReset(packet))); | 214 BuildPublicReset(packet))); |
| 216 } | 215 } |
| 217 | 216 |
| 218 std::unique_ptr<QuicEncryptedPacket> QuicTimeWaitListManager::BuildPublicReset( | 217 std::unique_ptr<QuicEncryptedPacket> QuicTimeWaitListManager::BuildPublicReset( |
| 219 const QuicPublicResetPacket& packet) { | 218 const QuicPublicResetPacket& packet) { |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 version(version_), | 319 version(version_), |
| 321 time_added(time_added_), | 320 time_added(time_added_), |
| 322 connection_rejected_statelessly(connection_rejected_statelessly) {} | 321 connection_rejected_statelessly(connection_rejected_statelessly) {} |
| 323 | 322 |
| 324 QuicTimeWaitListManager::ConnectionIdData::ConnectionIdData( | 323 QuicTimeWaitListManager::ConnectionIdData::ConnectionIdData( |
| 325 ConnectionIdData&& other) = default; | 324 ConnectionIdData&& other) = default; |
| 326 | 325 |
| 327 QuicTimeWaitListManager::ConnectionIdData::~ConnectionIdData() {} | 326 QuicTimeWaitListManager::ConnectionIdData::~ConnectionIdData() {} |
| 328 | 327 |
| 329 } // namespace net | 328 } // namespace net |
| OLD | NEW |