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

Side by Side Diff: net/quic/quic_protocol.h

Issue 1979633003: Clean up the pretty-printing of QUIC frames to be internally consistent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@121705514
Patch Set: Created 4 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
« no previous file with comments | « no previous file | net/quic/quic_protocol.cc » ('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 #ifndef NET_QUIC_QUIC_PROTOCOL_H_ 5 #ifndef NET_QUIC_QUIC_PROTOCOL_H_
6 #define NET_QUIC_QUIC_PROTOCOL_H_ 6 #define NET_QUIC_QUIC_PROTOCOL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 }; 773 };
774 774
775 typedef QuicPacketPublicHeader QuicVersionNegotiationPacket; 775 typedef QuicPacketPublicHeader QuicVersionNegotiationPacket;
776 776
777 // A padding frame contains no payload. 777 // A padding frame contains no payload.
778 struct NET_EXPORT_PRIVATE QuicPaddingFrame { 778 struct NET_EXPORT_PRIVATE QuicPaddingFrame {
779 QuicPaddingFrame() : num_padding_bytes(-1) {} 779 QuicPaddingFrame() : num_padding_bytes(-1) {}
780 explicit QuicPaddingFrame(int num_padding_bytes) 780 explicit QuicPaddingFrame(int num_padding_bytes)
781 : num_padding_bytes(num_padding_bytes) {} 781 : num_padding_bytes(num_padding_bytes) {}
782 782
783 NET_EXPORT_PRIVATE friend std::ostream& operator<<(std::ostream& os,
784 const QuicPaddingFrame& s);
785
783 // -1: full padding to the end of a max-sized packet 786 // -1: full padding to the end of a max-sized packet
784 // otherwise: only pad up to num_padding_bytes bytes 787 // otherwise: only pad up to num_padding_bytes bytes
785 int num_padding_bytes; 788 int num_padding_bytes;
786 }; 789 };
787 790
788 // A ping frame contains no payload, though it is retransmittable, 791 // A ping frame contains no payload, though it is retransmittable,
789 // and ACK'd just like other normal frames. 792 // and ACK'd just like other normal frames.
790 struct NET_EXPORT_PRIVATE QuicPingFrame {}; 793 struct NET_EXPORT_PRIVATE QuicPingFrame {};
791 794
792 // A path MTU discovery frame contains no payload and is serialized as a ping 795 // A path MTU discovery frame contains no payload and is serialized as a ping
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
1488 : iov(iov), iov_count(iov_count), total_length(total_length) {} 1491 : iov(iov), iov_count(iov_count), total_length(total_length) {}
1489 1492
1490 const struct iovec* iov; 1493 const struct iovec* iov;
1491 const int iov_count; 1494 const int iov_count;
1492 const size_t total_length; 1495 const size_t total_length;
1493 }; 1496 };
1494 1497
1495 } // namespace net 1498 } // namespace net
1496 1499
1497 #endif // NET_QUIC_QUIC_PROTOCOL_H_ 1500 #endif // NET_QUIC_QUIC_PROTOCOL_H_
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_protocol.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698