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 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
822 DCHECK(connected_); | 822 DCHECK(connected_); |
823 if (debug_visitor_ != nullptr) { | 823 if (debug_visitor_ != nullptr) { |
824 debug_visitor_->OnPingFrame(frame); | 824 debug_visitor_->OnPingFrame(frame); |
825 } | 825 } |
826 should_last_packet_instigate_acks_ = true; | 826 should_last_packet_instigate_acks_ = true; |
827 return true; | 827 return true; |
828 } | 828 } |
829 | 829 |
830 const char* QuicConnection::ValidateAckFrame(const QuicAckFrame& incoming_ack) { | 830 const char* QuicConnection::ValidateAckFrame(const QuicAckFrame& incoming_ack) { |
831 if (incoming_ack.largest_observed > packet_generator_.packet_number()) { | 831 if (incoming_ack.largest_observed > packet_generator_.packet_number()) { |
832 LOG(WARNING) << ENDPOINT << "Peer's observed unsent packet:" | 832 DLOG(WARNING) << ENDPOINT << "Peer's observed unsent packet:" |
833 << incoming_ack.largest_observed << " vs " | 833 << incoming_ack.largest_observed << " vs " |
834 << packet_generator_.packet_number(); | 834 << packet_generator_.packet_number(); |
835 // We got an error for data we have not sent. Error out. | 835 // We got an error for data we have not sent. Error out. |
836 return "Largest observed too high."; | 836 return "Largest observed too high."; |
837 } | 837 } |
838 | 838 |
839 if (incoming_ack.largest_observed < | 839 if (incoming_ack.largest_observed < |
840 sent_packet_manager_->GetLargestObserved(incoming_ack.path_id)) { | 840 sent_packet_manager_->GetLargestObserved(incoming_ack.path_id)) { |
841 LOG(WARNING) << ENDPOINT << "Peer's largest_observed packet decreased:" | 841 LOG(WARNING) << ENDPOINT << "Peer's largest_observed packet decreased:" |
842 << incoming_ack.largest_observed << " vs " | 842 << incoming_ack.largest_observed << " vs " |
843 << sent_packet_manager_->GetLargestObserved( | 843 << sent_packet_manager_->GetLargestObserved( |
844 incoming_ack.path_id) | 844 incoming_ack.path_id) |
(...skipping 1665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2510 // the sender and a signaling mechanism -- if the sender uses a | 2510 // the sender and a signaling mechanism -- if the sender uses a |
2511 // different MinRTO, we may get spurious retransmissions. May not have | 2511 // different MinRTO, we may get spurious retransmissions. May not have |
2512 // any benefits, but if the delayed ack becomes a significant source | 2512 // any benefits, but if the delayed ack becomes a significant source |
2513 // of (likely, tail) latency, then consider such a mechanism. | 2513 // of (likely, tail) latency, then consider such a mechanism. |
2514 const QuicTime::Delta QuicConnection::DelayedAckTime() { | 2514 const QuicTime::Delta QuicConnection::DelayedAckTime() { |
2515 return QuicTime::Delta::FromMilliseconds( | 2515 return QuicTime::Delta::FromMilliseconds( |
2516 min(kMaxDelayedAckTimeMs, kMinRetransmissionTimeMs / 2)); | 2516 min(kMaxDelayedAckTimeMs, kMinRetransmissionTimeMs / 2)); |
2517 } | 2517 } |
2518 | 2518 |
2519 } // namespace net | 2519 } // namespace net |
OLD | NEW |