Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Side by Side Diff: net/quic/quic_connection.cc

Issue 15951002: QUIC - Added StringToHexASCIIDump to return a hex+ASCII dump in the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing windows build error Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | net/quic/quic_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 1033
1034 scoped_ptr<QuicEncryptedPacket> encrypted( 1034 scoped_ptr<QuicEncryptedPacket> encrypted(
1035 framer_.EncryptPacket(level, sequence_number, *packet)); 1035 framer_.EncryptPacket(level, sequence_number, *packet));
1036 DLOG(INFO) << ENDPOINT << "Sending packet number " << sequence_number 1036 DLOG(INFO) << ENDPOINT << "Sending packet number " << sequence_number
1037 << " : " << (packet->is_fec_packet() ? "FEC " : 1037 << " : " << (packet->is_fec_packet() ? "FEC " :
1038 (retransmittable == HAS_RETRANSMITTABLE_DATA 1038 (retransmittable == HAS_RETRANSMITTABLE_DATA
1039 ? "data bearing " : " ack only ")) 1039 ? "data bearing " : " ack only "))
1040 << ", encryption level: " 1040 << ", encryption level: "
1041 << QuicUtils::EncryptionLevelToString(level) 1041 << QuicUtils::EncryptionLevelToString(level)
1042 << ", length:" << packet->length(); 1042 << ", length:" << packet->length();
1043 // TODO(rtenneti): Get StringToHexASCIIDump of packet.
1044 DVLOG(2) << ENDPOINT << "packet(" << sequence_number << "): " << std::endl 1043 DVLOG(2) << ENDPOINT << "packet(" << sequence_number << "): " << std::endl
1045 << packet->AsStringPiece(); 1044 << QuicUtils::StringToHexASCIIDump(packet->AsStringPiece());
1046 1045
1047 DCHECK(encrypted->length() <= kMaxPacketSize) 1046 DCHECK(encrypted->length() <= kMaxPacketSize)
1048 << "Packet " << sequence_number << " will not be read; too large: " 1047 << "Packet " << sequence_number << " will not be read; too large: "
1049 << packet->length() << " " << encrypted->length() << " " 1048 << packet->length() << " " << encrypted->length() << " "
1050 << outgoing_ack_ << " forced: " << (forced == FORCE ? "yes" : "no"); 1049 << outgoing_ack_ << " forced: " << (forced == FORCE ? "yes" : "no");
1051 1050
1052 int error; 1051 int error;
1053 QuicTime now = clock_->Now(); 1052 QuicTime now = clock_->Now();
1054 if (helper_->WritePacketToWire(*encrypted, &error) == -1) { 1053 if (helper_->WritePacketToWire(*encrypted, &error) == -1) {
1055 if (helper_->IsWriteBlocked(error)) { 1054 if (helper_->IsWriteBlocked(error)) {
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
1390 << " delta:" << delta.ToMicroseconds(); 1389 << " delta:" << delta.ToMicroseconds();
1391 if (delta >= timeout_) { 1390 if (delta >= timeout_) {
1392 SendConnectionClose(QUIC_CONNECTION_TIMED_OUT); 1391 SendConnectionClose(QUIC_CONNECTION_TIMED_OUT);
1393 return true; 1392 return true;
1394 } 1393 }
1395 helper_->SetTimeoutAlarm(timeout_.Subtract(delta)); 1394 helper_->SetTimeoutAlarm(timeout_.Subtract(delta));
1396 return false; 1395 return false;
1397 } 1396 }
1398 1397
1399 } // namespace net 1398 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698