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/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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 } | 358 } |
359 | 359 |
360 sent_packet_manager_.SetFromConfig(config); | 360 sent_packet_manager_.SetFromConfig(config); |
361 if (config.HasReceivedBytesForConnectionId() && | 361 if (config.HasReceivedBytesForConnectionId() && |
362 can_truncate_connection_ids_) { | 362 can_truncate_connection_ids_) { |
363 packet_generator_.SetConnectionIdLength( | 363 packet_generator_.SetConnectionIdLength( |
364 config.ReceivedBytesForConnectionId()); | 364 config.ReceivedBytesForConnectionId()); |
365 } | 365 } |
366 max_undecryptable_packets_ = config.max_undecryptable_packets(); | 366 max_undecryptable_packets_ = config.max_undecryptable_packets(); |
367 | 367 |
368 if (FLAGS_quic_send_fec_packet_only_on_fec_alarm && | 368 if (config.HasClientSentConnectionOption(kFSPA, perspective_)) { |
369 config.HasClientSentConnectionOption(kFSPA, perspective_)) { | |
370 packet_generator_.set_fec_send_policy(FecSendPolicy::FEC_ALARM_TRIGGER); | 369 packet_generator_.set_fec_send_policy(FecSendPolicy::FEC_ALARM_TRIGGER); |
371 } | 370 } |
372 | 371 |
373 if (config.HasClientSentConnectionOption(kMTUH, perspective_)) { | 372 if (config.HasClientSentConnectionOption(kMTUH, perspective_)) { |
374 mtu_discovery_target_ = kMtuDiscoveryTargetPacketSizeHigh; | 373 mtu_discovery_target_ = kMtuDiscoveryTargetPacketSizeHigh; |
375 } | 374 } |
376 if (config.HasClientSentConnectionOption(kMTUL, perspective_)) { | 375 if (config.HasClientSentConnectionOption(kMTUL, perspective_)) { |
377 mtu_discovery_target_ = kMtuDiscoveryTargetPacketSizeLow; | 376 mtu_discovery_target_ = kMtuDiscoveryTargetPacketSizeLow; |
378 } | 377 } |
379 } | 378 } |
(...skipping 1999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2379 sequence_number_of_last_sent_packet_ + packets_between_mtu_probes_ + 1; | 2378 sequence_number_of_last_sent_packet_ + packets_between_mtu_probes_ + 1; |
2380 ++mtu_probe_count_; | 2379 ++mtu_probe_count_; |
2381 | 2380 |
2382 DVLOG(2) << "Sending a path MTU discovery packet #" << mtu_probe_count_; | 2381 DVLOG(2) << "Sending a path MTU discovery packet #" << mtu_probe_count_; |
2383 SendMtuDiscoveryPacket(mtu_discovery_target_); | 2382 SendMtuDiscoveryPacket(mtu_discovery_target_); |
2384 | 2383 |
2385 DCHECK(!mtu_discovery_alarm_->IsSet()); | 2384 DCHECK(!mtu_discovery_alarm_->IsSet()); |
2386 } | 2385 } |
2387 | 2386 |
2388 } // namespace net | 2387 } // namespace net |
OLD | NEW |