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 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1475 return false; | 1475 return false; |
1476 } | 1476 } |
1477 | 1477 |
1478 QuicPacketSequenceNumber sequence_number = pending_write_->sequence_number; | 1478 QuicPacketSequenceNumber sequence_number = pending_write_->sequence_number; |
1479 TransmissionType transmission_type = pending_write_->transmission_type; | 1479 TransmissionType transmission_type = pending_write_->transmission_type; |
1480 HasRetransmittableData retransmittable = pending_write_->retransmittable; | 1480 HasRetransmittableData retransmittable = pending_write_->retransmittable; |
1481 size_t length = pending_write_->length; | 1481 size_t length = pending_write_->length; |
1482 pending_write_.reset(); | 1482 pending_write_.reset(); |
1483 | 1483 |
1484 if (result.status == WRITE_STATUS_ERROR) { | 1484 if (result.status == WRITE_STATUS_ERROR) { |
1485 DVLOG(1) << "Write failed with error: " << result.error_code << " (" | 1485 DVLOG(1) << ENDPOINT << "Write failed with error: " << result.error_code |
1486 << ErrorToString(result.error_code) << ")"; | 1486 << " (" << ErrorToString(result.error_code) << ")"; |
1487 // We can't send an error as the socket is presumably borked. | 1487 // We can't send an error as the socket is presumably borked. |
1488 CloseConnection(QUIC_PACKET_WRITE_ERROR, false); | 1488 CloseConnection(QUIC_PACKET_WRITE_ERROR, false); |
1489 return false; | 1489 return false; |
1490 } | 1490 } |
1491 | 1491 |
1492 QuicTime now = clock_->Now(); | 1492 QuicTime now = clock_->Now(); |
1493 if (transmission_type == NOT_RETRANSMISSION) { | 1493 if (transmission_type == NOT_RETRANSMISSION) { |
1494 time_of_last_sent_new_packet_ = now; | 1494 time_of_last_sent_new_packet_ = now; |
1495 } | 1495 } |
1496 SetPingAlarm(); | 1496 SetPingAlarm(); |
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1977 // If we changed the generator's batch state, restore original batch state. | 1977 // If we changed the generator's batch state, restore original batch state. |
1978 if (!already_in_batch_mode_) { | 1978 if (!already_in_batch_mode_) { |
1979 DVLOG(1) << "Leaving Batch Mode."; | 1979 DVLOG(1) << "Leaving Batch Mode."; |
1980 connection_->packet_generator_.FinishBatchOperations(); | 1980 connection_->packet_generator_.FinishBatchOperations(); |
1981 } | 1981 } |
1982 DCHECK_EQ(already_in_batch_mode_, | 1982 DCHECK_EQ(already_in_batch_mode_, |
1983 connection_->packet_generator_.InBatchMode()); | 1983 connection_->packet_generator_.InBatchMode()); |
1984 } | 1984 } |
1985 | 1985 |
1986 } // namespace net | 1986 } // namespace net |
OLD | NEW |