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 #include <algorithm> | 9 #include <algorithm> |
10 #include <iterator> | 10 #include <iterator> |
(...skipping 1558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1569 delete packet.packet; | 1569 delete packet.packet; |
1570 return true; | 1570 return true; |
1571 } | 1571 } |
1572 queued_packet.type = QUEUED; | 1572 queued_packet.type = QUEUED; |
1573 queued_packets_.push_back(queued_packet); | 1573 queued_packets_.push_back(queued_packet); |
1574 return false; | 1574 return false; |
1575 } | 1575 } |
1576 | 1576 |
1577 void QuicConnection::UpdateStopWaiting(QuicStopWaitingFrame* stop_waiting) { | 1577 void QuicConnection::UpdateStopWaiting(QuicStopWaitingFrame* stop_waiting) { |
1578 stop_waiting->least_unacked = GetLeastUnacked(); | 1578 stop_waiting->least_unacked = GetLeastUnacked(); |
1579 stop_waiting->entropy_hash = sent_entropy_manager_.EntropyHash( | 1579 stop_waiting->entropy_hash = sent_entropy_manager_.GetCumulativeEntropy( |
1580 stop_waiting->least_unacked - 1); | 1580 stop_waiting->least_unacked - 1); |
1581 } | 1581 } |
1582 | 1582 |
1583 void QuicConnection::SendPing() { | 1583 void QuicConnection::SendPing() { |
1584 if (retransmission_alarm_->IsSet()) { | 1584 if (retransmission_alarm_->IsSet()) { |
1585 return; | 1585 return; |
1586 } | 1586 } |
1587 if (version() == QUIC_VERSION_16) { | 1587 if (version() == QUIC_VERSION_16) { |
1588 // TODO(rch): remove this when we remove version 15 and 16. | 1588 // TODO(rch): remove this when we remove version 15 and 16. |
1589 // This is a horrible hideous hack which we should not support. | 1589 // This is a horrible hideous hack which we should not support. |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2014 // If we changed the generator's batch state, restore original batch state. | 2014 // If we changed the generator's batch state, restore original batch state. |
2015 if (!already_in_batch_mode_) { | 2015 if (!already_in_batch_mode_) { |
2016 DVLOG(1) << "Leaving Batch Mode."; | 2016 DVLOG(1) << "Leaving Batch Mode."; |
2017 connection_->packet_generator_.FinishBatchOperations(); | 2017 connection_->packet_generator_.FinishBatchOperations(); |
2018 } | 2018 } |
2019 DCHECK_EQ(already_in_batch_mode_, | 2019 DCHECK_EQ(already_in_batch_mode_, |
2020 connection_->packet_generator_.InBatchMode()); | 2020 connection_->packet_generator_.InBatchMode()); |
2021 } | 2021 } |
2022 | 2022 |
2023 } // namespace net | 2023 } // namespace net |
OLD | NEW |