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_protocol.h" | 5 #include "net/quic/quic_protocol.h" |
6 | 6 |
7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
8 #include "net/quic/quic_utils.h" | 8 #include "net/quic/quic_utils.h" |
9 | 9 |
10 using base::StringPiece; | 10 using base::StringPiece; |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 string result = ""; | 192 string result = ""; |
193 for (size_t i = 0; i < versions.size(); ++i) { | 193 for (size_t i = 0; i < versions.size(); ++i) { |
194 if (i != 0) { | 194 if (i != 0) { |
195 result.append(","); | 195 result.append(","); |
196 } | 196 } |
197 result.append(QuicVersionToString(versions[i])); | 197 result.append(QuicVersionToString(versions[i])); |
198 } | 198 } |
199 return result; | 199 return result; |
200 } | 200 } |
201 | 201 |
| 202 ostream& operator<<(ostream& os, const Perspective& s) { |
| 203 if (s == Perspective::IS_SERVER) { |
| 204 os << "IS_SERVER"; |
| 205 } else { |
| 206 os << "IS_CLIENT"; |
| 207 } |
| 208 return os; |
| 209 } |
| 210 |
202 ostream& operator<<(ostream& os, const QuicPacketHeader& header) { | 211 ostream& operator<<(ostream& os, const QuicPacketHeader& header) { |
203 os << "{ connection_id: " << header.public_header.connection_id | 212 os << "{ connection_id: " << header.public_header.connection_id |
204 << ", connection_id_length:" << header.public_header.connection_id_length | 213 << ", connection_id_length:" << header.public_header.connection_id_length |
205 << ", sequence_number_length:" | 214 << ", sequence_number_length:" |
206 << header.public_header.sequence_number_length | 215 << header.public_header.sequence_number_length |
207 << ", reset_flag: " << header.public_header.reset_flag | 216 << ", reset_flag: " << header.public_header.reset_flag |
208 << ", version_flag: " << header.public_header.version_flag; | 217 << ", version_flag: " << header.public_header.version_flag; |
209 if (header.public_header.version_flag) { | 218 if (header.public_header.version_flag) { |
210 os << " version: "; | 219 os << " version: "; |
211 for (size_t i = 0; i < header.public_header.versions.size(); ++i) { | 220 for (size_t i = 0; i < header.public_header.versions.size(); ++i) { |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
668 bytes_sent(bytes_sent), | 677 bytes_sent(bytes_sent), |
669 nack_count(0), | 678 nack_count(0), |
670 transmission_type(transmission_type), | 679 transmission_type(transmission_type), |
671 all_transmissions(nullptr), | 680 all_transmissions(nullptr), |
672 in_flight(false), | 681 in_flight(false), |
673 is_unackable(false), | 682 is_unackable(false), |
674 is_fec_packet(is_fec_packet) { | 683 is_fec_packet(is_fec_packet) { |
675 } | 684 } |
676 | 685 |
677 } // namespace net | 686 } // namespace net |
OLD | NEW |