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

Side by Side Diff: net/quic/quic_connection.cc

Issue 1495243002: Remove EncryptionLevel from QUIC's RetransmittableFrames and add it to TransmissionInfo. No functi… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@108735153
Patch Set: Created 5 years 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
OLDNEW
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/quic/quic_connection.h" 5 #include "net/quic/quic_connection.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 #include <sys/types.h> 8 #include <sys/types.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1436 matching lines...) Expand 10 before | Expand all | Expand 10 after
1447 // Re-packetize the frames with a new packet number for retransmission. 1447 // Re-packetize the frames with a new packet number for retransmission.
1448 // Retransmitted data packets do not use FEC, even when it's enabled. 1448 // Retransmitted data packets do not use FEC, even when it's enabled.
1449 // Retransmitted packets use the same packet number length as the 1449 // Retransmitted packets use the same packet number length as the
1450 // original. 1450 // original.
1451 // Flush the packet generator before making a new packet. 1451 // Flush the packet generator before making a new packet.
1452 // TODO(ianswett): Implement ReserializeAllFrames as a separate path that 1452 // TODO(ianswett): Implement ReserializeAllFrames as a separate path that
1453 // does not require the creator to be flushed. 1453 // does not require the creator to be flushed.
1454 packet_generator_.FlushAllQueuedFrames(); 1454 packet_generator_.FlushAllQueuedFrames();
1455 char buffer[kMaxPacketSize]; 1455 char buffer[kMaxPacketSize];
1456 SerializedPacket serialized_packet = packet_generator_.ReserializeAllFrames( 1456 SerializedPacket serialized_packet = packet_generator_.ReserializeAllFrames(
1457 pending.retransmittable_frames, pending.packet_number_length, buffer, 1457 pending.retransmittable_frames, pending.encryption_level,
1458 kMaxPacketSize); 1458 pending.packet_number_length, buffer, kMaxPacketSize);
1459 if (serialized_packet.packet == nullptr) { 1459 if (serialized_packet.packet == nullptr) {
1460 // We failed to serialize the packet, so close the connection. 1460 // We failed to serialize the packet, so close the connection.
1461 // CloseConnection does not send close packet, so no infinite loop here. 1461 // CloseConnection does not send close packet, so no infinite loop here.
1462 CloseConnection(QUIC_ENCRYPTION_FAILURE, false); 1462 CloseConnection(QUIC_ENCRYPTION_FAILURE, false);
1463 return; 1463 return;
1464 } 1464 }
1465 1465
1466 DVLOG(1) << ENDPOINT << "Retransmitting " << pending.packet_number << " as " 1466 DVLOG(1) << ENDPOINT << "Retransmitting " << pending.packet_number << " as "
1467 << serialized_packet.packet_number; 1467 << serialized_packet.packet_number;
1468 SendOrQueuePacket(QueuedPacket(serialized_packet, pending.transmission_type, 1468 SendOrQueuePacket(QueuedPacket(serialized_packet, pending.transmission_type,
(...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after
2383 packet_number_of_last_sent_packet_ + packets_between_mtu_probes_ + 1; 2383 packet_number_of_last_sent_packet_ + packets_between_mtu_probes_ + 1;
2384 ++mtu_probe_count_; 2384 ++mtu_probe_count_;
2385 2385
2386 DVLOG(2) << "Sending a path MTU discovery packet #" << mtu_probe_count_; 2386 DVLOG(2) << "Sending a path MTU discovery packet #" << mtu_probe_count_;
2387 SendMtuDiscoveryPacket(mtu_discovery_target_); 2387 SendMtuDiscoveryPacket(mtu_discovery_target_);
2388 2388
2389 DCHECK(!mtu_discovery_alarm_->IsSet()); 2389 DCHECK(!mtu_discovery_alarm_->IsSet());
2390 } 2390 }
2391 2391
2392 } // namespace net 2392 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/congestion_control/time_loss_algorithm_test.cc ('k') | net/quic/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698