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 <limits> | 9 #include <limits> |
10 #include <list> | 10 #include <list> |
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 // Universal header. All QuicPacket headers will have a connection_id and | 585 // Universal header. All QuicPacket headers will have a connection_id and |
586 // public flags. | 586 // public flags. |
587 QuicConnectionId connection_id; | 587 QuicConnectionId connection_id; |
588 QuicConnectionIdLength connection_id_length; | 588 QuicConnectionIdLength connection_id_length; |
589 bool reset_flag; | 589 bool reset_flag; |
590 bool version_flag; | 590 bool version_flag; |
591 QuicSequenceNumberLength sequence_number_length; | 591 QuicSequenceNumberLength sequence_number_length; |
592 QuicVersionVector versions; | 592 QuicVersionVector versions; |
593 }; | 593 }; |
594 | 594 |
| 595 // An integer which cannot be a packet sequence number. |
| 596 const QuicPacketSequenceNumber kInvalidPacketSequenceNumber = 0; |
| 597 |
595 // Header for Data or FEC packets. | 598 // Header for Data or FEC packets. |
596 struct NET_EXPORT_PRIVATE QuicPacketHeader { | 599 struct NET_EXPORT_PRIVATE QuicPacketHeader { |
597 QuicPacketHeader(); | 600 QuicPacketHeader(); |
598 explicit QuicPacketHeader(const QuicPacketPublicHeader& header); | 601 explicit QuicPacketHeader(const QuicPacketPublicHeader& header); |
599 | 602 |
600 NET_EXPORT_PRIVATE friend std::ostream& operator<<( | 603 NET_EXPORT_PRIVATE friend std::ostream& operator<<( |
601 std::ostream& os, const QuicPacketHeader& s); | 604 std::ostream& os, const QuicPacketHeader& s); |
602 | 605 |
603 QuicPacketPublicHeader public_header; | 606 QuicPacketPublicHeader public_header; |
604 bool fec_flag; | 607 bool fec_flag; |
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1036 bool in_flight; | 1039 bool in_flight; |
1037 // True if the packet can never be acked, so it can be removed. | 1040 // True if the packet can never be acked, so it can be removed. |
1038 bool is_unackable; | 1041 bool is_unackable; |
1039 // True if the packet is an FEC packet. | 1042 // True if the packet is an FEC packet. |
1040 bool is_fec_packet; | 1043 bool is_fec_packet; |
1041 }; | 1044 }; |
1042 | 1045 |
1043 } // namespace net | 1046 } // namespace net |
1044 | 1047 |
1045 #endif // NET_QUIC_QUIC_PROTOCOL_H_ | 1048 #endif // NET_QUIC_QUIC_PROTOCOL_H_ |
OLD | NEW |