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 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
471 return false; | 471 return false; |
472 } | 472 } |
473 | 473 |
474 last_ack_frames_.push_back(incoming_ack); | 474 last_ack_frames_.push_back(incoming_ack); |
475 return connected_; | 475 return connected_; |
476 } | 476 } |
477 | 477 |
478 void QuicConnection::ProcessAckFrame(const QuicAckFrame& incoming_ack) { | 478 void QuicConnection::ProcessAckFrame(const QuicAckFrame& incoming_ack) { |
479 largest_seen_packet_with_ack_ = last_header_.packet_sequence_number; | 479 largest_seen_packet_with_ack_ = last_header_.packet_sequence_number; |
480 | 480 |
481 received_packet_manager_.UpdatePacketInformationReceivedByPeer(incoming_ack); | 481 received_packet_manager_.UpdatePacketInformationReceivedByPeer( |
482 received_packet_manager_.UpdatePacketInformationSentByPeer(incoming_ack); | 482 incoming_ack.received_info); |
| 483 received_packet_manager_.UpdatePacketInformationSentByPeer( |
| 484 incoming_ack.sent_info); |
483 // Possibly close any FecGroups which are now irrelevant. | 485 // Possibly close any FecGroups which are now irrelevant. |
484 CloseFecGroupsBefore(incoming_ack.sent_info.least_unacked + 1); | 486 CloseFecGroupsBefore(incoming_ack.sent_info.least_unacked + 1); |
485 | 487 |
486 sent_entropy_manager_.ClearEntropyBefore( | 488 sent_entropy_manager_.ClearEntropyBefore( |
487 received_packet_manager_.least_packet_awaited_by_peer() - 1); | 489 received_packet_manager_.least_packet_awaited_by_peer() - 1); |
488 | 490 |
489 bool reset_retransmission_alarm = | 491 bool reset_retransmission_alarm = |
490 sent_packet_manager_.OnIncomingAck(incoming_ack.received_info, | 492 sent_packet_manager_.OnIncomingAck(incoming_ack.received_info, |
491 time_of_last_received_packet_); | 493 time_of_last_received_packet_); |
492 if (sent_packet_manager_.HasPendingRetransmissions()) { | 494 if (sent_packet_manager_.HasPendingRetransmissions()) { |
(...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1681 // If we changed the generator's batch state, restore original batch state. | 1683 // If we changed the generator's batch state, restore original batch state. |
1682 if (!already_in_batch_mode_) { | 1684 if (!already_in_batch_mode_) { |
1683 DVLOG(1) << "Leaving Batch Mode."; | 1685 DVLOG(1) << "Leaving Batch Mode."; |
1684 connection_->packet_generator_.FinishBatchOperations(); | 1686 connection_->packet_generator_.FinishBatchOperations(); |
1685 } | 1687 } |
1686 DCHECK_EQ(already_in_batch_mode_, | 1688 DCHECK_EQ(already_in_batch_mode_, |
1687 connection_->packet_generator_.InBatchMode()); | 1689 connection_->packet_generator_.InBatchMode()); |
1688 } | 1690 } |
1689 | 1691 |
1690 } // namespace net | 1692 } // namespace net |
OLD | NEW |