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 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1190 return true; | 1190 return true; |
1191 } | 1191 } |
1192 } else { | 1192 } else { |
1193 encrypted_deleter.reset(encrypted); | 1193 encrypted_deleter.reset(encrypted); |
1194 } | 1194 } |
1195 | 1195 |
1196 LOG_IF(DFATAL, encrypted->length() > options()->max_packet_length) | 1196 LOG_IF(DFATAL, encrypted->length() > options()->max_packet_length) |
1197 << "Writing an encrypted packet larger than max_packet_length:" | 1197 << "Writing an encrypted packet larger than max_packet_length:" |
1198 << options()->max_packet_length << " encrypted length: " | 1198 << options()->max_packet_length << " encrypted length: " |
1199 << encrypted->length(); | 1199 << encrypted->length(); |
1200 DVLOG(1) << ENDPOINT << "Sending packet number " << sequence_number | 1200 DVLOG(1) << ENDPOINT << "Sending packet " << sequence_number |
1201 << " : " << (packet.packet->is_fec_packet() ? "FEC " : | 1201 << " : " << (packet.packet->is_fec_packet() ? "FEC " : |
1202 (packet.retransmittable == HAS_RETRANSMITTABLE_DATA | 1202 (packet.retransmittable == HAS_RETRANSMITTABLE_DATA |
1203 ? "data bearing " : " ack only ")) | 1203 ? "data bearing " : " ack only ")) |
1204 << ", encryption level: " | 1204 << ", encryption level: " |
1205 << QuicUtils::EncryptionLevelToString(packet.encryption_level) | 1205 << QuicUtils::EncryptionLevelToString(packet.encryption_level) |
1206 << ", length:" << packet.packet->length() << ", encrypted length:" | 1206 << ", length:" << packet.packet->length() << ", encrypted length:" |
1207 << encrypted->length(); | 1207 << encrypted->length(); |
1208 DVLOG(2) << ENDPOINT << "packet(" << sequence_number << "): " << std::endl | 1208 DVLOG(2) << ENDPOINT << "packet(" << sequence_number << "): " << std::endl |
1209 << QuicUtils::StringToHexASCIIDump(packet.packet->AsStringPiece()); | 1209 << QuicUtils::StringToHexASCIIDump(packet.packet->AsStringPiece()); |
1210 | 1210 |
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1722 // If we changed the generator's batch state, restore original batch state. | 1722 // If we changed the generator's batch state, restore original batch state. |
1723 if (!already_in_batch_mode_) { | 1723 if (!already_in_batch_mode_) { |
1724 DVLOG(1) << "Leaving Batch Mode."; | 1724 DVLOG(1) << "Leaving Batch Mode."; |
1725 connection_->packet_generator_.FinishBatchOperations(); | 1725 connection_->packet_generator_.FinishBatchOperations(); |
1726 } | 1726 } |
1727 DCHECK_EQ(already_in_batch_mode_, | 1727 DCHECK_EQ(already_in_batch_mode_, |
1728 connection_->packet_generator_.InBatchMode()); | 1728 connection_->packet_generator_.InBatchMode()); |
1729 } | 1729 } |
1730 | 1730 |
1731 } // namespace net | 1731 } // namespace net |
OLD | NEW |