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 855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
866 | 866 |
867 QuicByteCount QuicSentPacketManager::GetSlowStartThreshold() const { | 867 QuicByteCount QuicSentPacketManager::GetSlowStartThreshold() const { |
868 return send_algorithm_->GetSlowStartThreshold(); | 868 return send_algorithm_->GetSlowStartThreshold(); |
869 } | 869 } |
870 | 870 |
871 void QuicSentPacketManager::EnablePacing() { | 871 void QuicSentPacketManager::EnablePacing() { |
872 if (using_pacing_) { | 872 if (using_pacing_) { |
873 return; | 873 return; |
874 } | 874 } |
875 | 875 |
876 // Set up a pacing sender with a 5 millisecond alarm granularity. | 876 // Set up a pacing sender with a 1 millisecond alarm granularity, the same as |
| 877 // the default granularity of the Linux kernel's FQ qdisc. |
877 using_pacing_ = true; | 878 using_pacing_ = true; |
878 send_algorithm_.reset( | 879 send_algorithm_.reset( |
879 new PacingSender(send_algorithm_.release(), | 880 new PacingSender(send_algorithm_.release(), |
880 QuicTime::Delta::FromMilliseconds(5), | 881 QuicTime::Delta::FromMilliseconds(1), |
881 kInitialUnpacedBurst)); | 882 kInitialUnpacedBurst)); |
882 } | 883 } |
883 | 884 |
884 } // namespace net | 885 } // namespace net |
OLD | NEW |