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_FRAMER_H_ | 5 #ifndef NET_QUIC_QUIC_FRAMER_H_ |
6 #define NET_QUIC_QUIC_FRAMER_H_ | 6 #define NET_QUIC_QUIC_FRAMER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 // Size in bytes reserved for the number of received packets with timestamps. | 54 // Size in bytes reserved for the number of received packets with timestamps. |
55 const size_t kQuicNumTimestampsSize = 1; | 55 const size_t kQuicNumTimestampsSize = 1; |
56 // Size in bytes reserved for the number of missing packets in ack frames. | 56 // Size in bytes reserved for the number of missing packets in ack frames. |
57 const size_t kNumberOfNackRangesSize = 1; | 57 const size_t kNumberOfNackRangesSize = 1; |
58 // Size in bytes reserved for the number of ack blocks in ack frames. | 58 // Size in bytes reserved for the number of ack blocks in ack frames. |
59 const size_t kNumberOfAckBlocksSize = 1; | 59 const size_t kNumberOfAckBlocksSize = 1; |
60 // Maximum number of missing packet ranges that can fit within an ack frame. | 60 // Maximum number of missing packet ranges that can fit within an ack frame. |
61 const size_t kMaxNackRanges = (1 << (kNumberOfNackRangesSize * 8)) - 1; | 61 const size_t kMaxNackRanges = (1 << (kNumberOfNackRangesSize * 8)) - 1; |
62 // Maximum number of ack blocks that can fit within an ack frame. | 62 // Maximum number of ack blocks that can fit within an ack frame. |
63 const size_t kMaxAckBlocks = (1 << (kNumberOfAckBlocksSize * 8)) - 1; | 63 const size_t kMaxAckBlocks = (1 << (kNumberOfAckBlocksSize * 8)) - 1; |
64 // Size in bytes reserved for the number of revived packets in ack frames. | |
65 const size_t kNumberOfRevivedPacketsSize = 1; | |
66 | 64 |
67 // This class receives callbacks from the framer when packets | 65 // This class receives callbacks from the framer when packets |
68 // are processed. | 66 // are processed. |
69 class NET_EXPORT_PRIVATE QuicFramerVisitorInterface { | 67 class NET_EXPORT_PRIVATE QuicFramerVisitorInterface { |
70 public: | 68 public: |
71 virtual ~QuicFramerVisitorInterface() {} | 69 virtual ~QuicFramerVisitorInterface() {} |
72 | 70 |
73 // Called if an error is detected in the QUIC protocol. | 71 // Called if an error is detected in the QUIC protocol. |
74 virtual void OnError(QuicFramer* framer) = 0; | 72 virtual void OnError(QuicFramer* framer) = 0; |
75 | 73 |
(...skipping 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
620 QuicTime::Delta last_timestamp_; | 618 QuicTime::Delta last_timestamp_; |
621 // The diversification nonce from the last received packet. | 619 // The diversification nonce from the last received packet. |
622 DiversificationNonce last_nonce_; | 620 DiversificationNonce last_nonce_; |
623 | 621 |
624 DISALLOW_COPY_AND_ASSIGN(QuicFramer); | 622 DISALLOW_COPY_AND_ASSIGN(QuicFramer); |
625 }; | 623 }; |
626 | 624 |
627 } // namespace net | 625 } // namespace net |
628 | 626 |
629 #endif // NET_QUIC_QUIC_FRAMER_H_ | 627 #endif // NET_QUIC_QUIC_FRAMER_H_ |
OLD | NEW |