OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_sent_packet_manager.h" | 5 #include "net/quic/quic_sent_packet_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
928 | 928 |
929 // Set up a pacing sender with a 1 millisecond alarm granularity, the same as | 929 // Set up a pacing sender with a 1 millisecond alarm granularity, the same as |
930 // the default granularity of the Linux kernel's FQ qdisc. | 930 // the default granularity of the Linux kernel's FQ qdisc. |
931 using_pacing_ = true; | 931 using_pacing_ = true; |
932 send_algorithm_.reset( | 932 send_algorithm_.reset( |
933 new PacingSender(send_algorithm_.release(), | 933 new PacingSender(send_algorithm_.release(), |
934 QuicTime::Delta::FromMilliseconds(1), | 934 QuicTime::Delta::FromMilliseconds(1), |
935 kInitialUnpacedBurst)); | 935 kInitialUnpacedBurst)); |
936 } | 936 } |
937 | 937 |
| 938 void QuicSentPacketManager::OnConnectionMigration(PeerAddressChangeType type) { |
| 939 if (type == UNKNOWN) { |
| 940 return; |
| 941 } |
| 942 |
| 943 if (type == NAT_PORT_REBINDING || type == IPV4_SUBNET_REBINDING) { |
| 944 // Rtt and cwnd do not need to be reset when the peer address change is |
| 945 // considered to be caused by NATs. |
| 946 return; |
| 947 } |
| 948 |
| 949 rtt_stats_.OnConnectionMigration(); |
| 950 send_algorithm_->OnConnectionMigration(); |
| 951 } |
| 952 |
938 } // namespace net | 953 } // namespace net |
OLD | NEW |