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

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

Issue 1009543004: Create a Perspective enum to use instead of a bool is_server to improve (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added NET_EXPORT_PRIVATE to fix compiler error Created 5 years, 9 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 | « net/quic/quic_packet_generator_test.cc ('k') | 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 <limits> 9 #include <limits>
10 #include <list> 10 #include <list>
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 enum HasRetransmittableData { 186 enum HasRetransmittableData {
187 NO_RETRANSMITTABLE_DATA, 187 NO_RETRANSMITTABLE_DATA,
188 HAS_RETRANSMITTABLE_DATA, 188 HAS_RETRANSMITTABLE_DATA,
189 }; 189 };
190 190
191 enum IsHandshake { 191 enum IsHandshake {
192 NOT_HANDSHAKE, 192 NOT_HANDSHAKE,
193 IS_HANDSHAKE 193 IS_HANDSHAKE
194 }; 194 };
195 195
196 enum class Perspective { IS_SERVER, IS_CLIENT };
197
198 NET_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os,
199 const Perspective& s);
200
196 // Indicates FEC protection level for data being written. 201 // Indicates FEC protection level for data being written.
197 enum FecProtection { 202 enum FecProtection {
198 MUST_FEC_PROTECT, // Callee must FEC protect this data. 203 MUST_FEC_PROTECT, // Callee must FEC protect this data.
199 MAY_FEC_PROTECT // Callee does not have to but may FEC protect this data. 204 MAY_FEC_PROTECT // Callee does not have to but may FEC protect this data.
200 }; 205 };
201 206
202 // Indicates FEC policy. 207 // Indicates FEC policy.
203 enum FecPolicy { 208 enum FecPolicy {
204 FEC_PROTECT_ALWAYS, // All data in the stream should be FEC protected. 209 FEC_PROTECT_ALWAYS, // All data in the stream should be FEC protected.
205 FEC_PROTECT_OPTIONAL // Data in the stream does not need FEC protection. 210 FEC_PROTECT_OPTIONAL // Data in the stream does not need FEC protection.
(...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after
1040 bool in_flight; 1045 bool in_flight;
1041 // True if the packet can never be acked, so it can be removed. 1046 // True if the packet can never be acked, so it can be removed.
1042 bool is_unackable; 1047 bool is_unackable;
1043 // True if the packet is an FEC packet. 1048 // True if the packet is an FEC packet.
1044 bool is_fec_packet; 1049 bool is_fec_packet;
1045 }; 1050 };
1046 1051
1047 } // namespace net 1052 } // namespace net
1048 1053
1049 #endif // NET_QUIC_QUIC_PROTOCOL_H_ 1054 #endif // NET_QUIC_QUIC_PROTOCOL_H_
OLDNEW
« no previous file with comments | « net/quic/quic_packet_generator_test.cc ('k') | net/quic/quic_protocol.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698