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/core/quic_connection.h" | 5 #include "net/quic/core/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 1400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1411 } | 1411 } |
1412 | 1412 |
1413 void QuicConnection::WriteAndBundleAcksIfNotBlocked() { | 1413 void QuicConnection::WriteAndBundleAcksIfNotBlocked() { |
1414 if (!writer_->IsWriteBlocked()) { | 1414 if (!writer_->IsWriteBlocked()) { |
1415 ScopedPacketBundler bundler(this, SEND_ACK_IF_QUEUED); | 1415 ScopedPacketBundler bundler(this, SEND_ACK_IF_QUEUED); |
1416 OnCanWrite(); | 1416 OnCanWrite(); |
1417 } | 1417 } |
1418 } | 1418 } |
1419 | 1419 |
1420 bool QuicConnection::ProcessValidatedPacket(const QuicPacketHeader& header) { | 1420 bool QuicConnection::ProcessValidatedPacket(const QuicPacketHeader& header) { |
1421 if (header.fec_flag) { | |
1422 // Drop any FEC packet. | |
1423 return false; | |
1424 } | |
1425 | |
1426 if (perspective_ == Perspective::IS_SERVER && | 1421 if (perspective_ == Perspective::IS_SERVER && |
1427 IsInitializedIPEndPoint(self_address_) && | 1422 IsInitializedIPEndPoint(self_address_) && |
1428 IsInitializedIPEndPoint(last_packet_destination_address_) && | 1423 IsInitializedIPEndPoint(last_packet_destination_address_) && |
1429 (!(self_address_ == last_packet_destination_address_))) { | 1424 (!(self_address_ == last_packet_destination_address_))) { |
1430 if (!FLAGS_quic_allow_server_address_change_for_mapped_ipv4) { | 1425 if (!FLAGS_quic_allow_server_address_change_for_mapped_ipv4) { |
1431 CloseConnection(QUIC_ERROR_MIGRATING_ADDRESS, | 1426 CloseConnection(QUIC_ERROR_MIGRATING_ADDRESS, |
1432 "Self address migration is not supported at the server.", | 1427 "Self address migration is not supported at the server.", |
1433 ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET); | 1428 ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET); |
1434 return false; | 1429 return false; |
1435 } | 1430 } |
(...skipping 1154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2590 | 2585 |
2591 void QuicConnection::CheckIfApplicationLimited() { | 2586 void QuicConnection::CheckIfApplicationLimited() { |
2592 if (queued_packets_.empty() && | 2587 if (queued_packets_.empty() && |
2593 !sent_packet_manager_->HasPendingRetransmissions() && | 2588 !sent_packet_manager_->HasPendingRetransmissions() && |
2594 !visitor_->WillingAndAbleToWrite()) { | 2589 !visitor_->WillingAndAbleToWrite()) { |
2595 sent_packet_manager_->OnApplicationLimited(); | 2590 sent_packet_manager_->OnApplicationLimited(); |
2596 } | 2591 } |
2597 } | 2592 } |
2598 | 2593 |
2599 } // namespace net | 2594 } // namespace net |
OLD | NEW |