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 1567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1578 // duplicate packet being sent. The helper must call OnCanWrite | 1578 // duplicate packet being sent. The helper must call OnCanWrite |
1579 // when the write completes, and OnWriteError if an error occurs. | 1579 // when the write completes, and OnWriteError if an error occurs. |
1580 if (!writer_->IsWriteBlockedDataBuffered()) { | 1580 if (!writer_->IsWriteBlockedDataBuffered()) { |
1581 return false; | 1581 return false; |
1582 } | 1582 } |
1583 } | 1583 } |
1584 if (result.status != WRITE_STATUS_ERROR && debug_visitor_ != nullptr) { | 1584 if (result.status != WRITE_STATUS_ERROR && debug_visitor_ != nullptr) { |
1585 // Pass the write result to the visitor. | 1585 // Pass the write result to the visitor. |
1586 debug_visitor_->OnPacketSent( | 1586 debug_visitor_->OnPacketSent( |
1587 packet->serialized_packet, packet->original_packet_number, | 1587 packet->serialized_packet, packet->original_packet_number, |
1588 packet->encryption_level, packet->transmission_type, *encrypted, | 1588 packet->encryption_level, packet->transmission_type, |
1589 packet_send_time); | 1589 encrypted->length(), packet_send_time); |
1590 } | 1590 } |
1591 if (packet->transmission_type == NOT_RETRANSMISSION) { | 1591 if (packet->transmission_type == NOT_RETRANSMISSION) { |
1592 time_of_last_sent_new_packet_ = packet_send_time; | 1592 time_of_last_sent_new_packet_ = packet_send_time; |
1593 if (IsRetransmittable(*packet) == HAS_RETRANSMITTABLE_DATA && | 1593 if (IsRetransmittable(*packet) == HAS_RETRANSMITTABLE_DATA && |
1594 last_send_for_timeout_ <= time_of_last_received_packet_) { | 1594 last_send_for_timeout_ <= time_of_last_received_packet_) { |
1595 last_send_for_timeout_ = packet_send_time; | 1595 last_send_for_timeout_ = packet_send_time; |
1596 } | 1596 } |
1597 } | 1597 } |
1598 SetPingAlarm(); | 1598 SetPingAlarm(); |
1599 MaybeSetFecAlarm(packet_number); | 1599 MaybeSetFecAlarm(packet_number); |
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2344 packet_number_of_last_sent_packet_ + packets_between_mtu_probes_ + 1; | 2344 packet_number_of_last_sent_packet_ + packets_between_mtu_probes_ + 1; |
2345 ++mtu_probe_count_; | 2345 ++mtu_probe_count_; |
2346 | 2346 |
2347 DVLOG(2) << "Sending a path MTU discovery packet #" << mtu_probe_count_; | 2347 DVLOG(2) << "Sending a path MTU discovery packet #" << mtu_probe_count_; |
2348 SendMtuDiscoveryPacket(mtu_discovery_target_); | 2348 SendMtuDiscoveryPacket(mtu_discovery_target_); |
2349 | 2349 |
2350 DCHECK(!mtu_discovery_alarm_->IsSet()); | 2350 DCHECK(!mtu_discovery_alarm_->IsSet()); |
2351 } | 2351 } |
2352 | 2352 |
2353 } // namespace net | 2353 } // namespace net |
OLD | NEW |