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 #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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 enum IsHandshake : int8_t { NOT_HANDSHAKE, IS_HANDSHAKE }; | 230 enum IsHandshake : int8_t { NOT_HANDSHAKE, IS_HANDSHAKE }; |
231 | 231 |
232 enum class Perspective { IS_SERVER, IS_CLIENT }; | 232 enum class Perspective { IS_SERVER, IS_CLIENT }; |
233 | 233 |
234 // Describes whether a ConnectionClose was originated by the peer. | 234 // Describes whether a ConnectionClose was originated by the peer. |
235 enum class ConnectionCloseSource { FROM_PEER, FROM_SELF }; | 235 enum class ConnectionCloseSource { FROM_PEER, FROM_SELF }; |
236 | 236 |
237 NET_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os, | 237 NET_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os, |
238 const Perspective& s); | 238 const Perspective& s); |
239 | 239 |
240 // Indicates FEC protection level for data being written. | |
241 enum FecProtection { | |
242 MUST_FEC_PROTECT, // Callee must FEC protect this data. | |
243 MAY_FEC_PROTECT // Callee does not have to but may FEC protect this data. | |
244 }; | |
245 | |
246 // Indicates FEC policy. | |
247 enum FecPolicy { | |
248 FEC_PROTECT_ALWAYS, // All data in the stream should be FEC protected. | |
249 FEC_PROTECT_OPTIONAL // Data in the stream does not need FEC protection. | |
250 }; | |
251 | |
252 // Indicates FEC policy about when to send FEC packet. | |
253 enum FecSendPolicy { | |
254 // Send FEC packet when FEC group is full or when FEC alarm goes off. | |
255 FEC_ANY_TRIGGER, | |
256 // Send FEC packet only when FEC alarm goes off. | |
257 FEC_ALARM_TRIGGER | |
258 }; | |
259 | |
260 enum QuicFrameType { | 240 enum QuicFrameType { |
261 // Regular frame types. The values set here cannot change without the | 241 // Regular frame types. The values set here cannot change without the |
262 // introduction of a new QUIC version. | 242 // introduction of a new QUIC version. |
263 PADDING_FRAME = 0, | 243 PADDING_FRAME = 0, |
264 RST_STREAM_FRAME = 1, | 244 RST_STREAM_FRAME = 1, |
265 CONNECTION_CLOSE_FRAME = 2, | 245 CONNECTION_CLOSE_FRAME = 2, |
266 GOAWAY_FRAME = 3, | 246 GOAWAY_FRAME = 3, |
267 WINDOW_UPDATE_FRAME = 4, | 247 WINDOW_UPDATE_FRAME = 4, |
268 BLOCKED_FRAME = 5, | 248 BLOCKED_FRAME = 5, |
269 STOP_WAITING_FRAME = 6, | 249 STOP_WAITING_FRAME = 6, |
(...skipping 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1415 : iov(iov), iov_count(iov_count), total_length(total_length) {} | 1395 : iov(iov), iov_count(iov_count), total_length(total_length) {} |
1416 | 1396 |
1417 const struct iovec* iov; | 1397 const struct iovec* iov; |
1418 const int iov_count; | 1398 const int iov_count; |
1419 const size_t total_length; | 1399 const size_t total_length; |
1420 }; | 1400 }; |
1421 | 1401 |
1422 } // namespace net | 1402 } // namespace net |
1423 | 1403 |
1424 #endif // NET_QUIC_QUIC_PROTOCOL_H_ | 1404 #endif // NET_QUIC_QUIC_PROTOCOL_H_ |
OLD | NEW |