| 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 // Tracks information about an FEC group, including the packets | 5 // Tracks information about an FEC group, including the packets |
| 6 // that have been seen, and the running parity. Provides the ability | 6 // that have been seen, and the running parity. Provides the ability |
| 7 // to revive a dropped packet. | 7 // to revive a dropped packet. |
| 8 | 8 |
| 9 #ifndef NET_QUIC_QUIC_FEC_GROUP_INTERFACE_H_ | 9 #ifndef NET_QUIC_QUIC_FEC_GROUP_INTERFACE_H_ |
| 10 #define NET_QUIC_QUIC_FEC_GROUP_INTERFACE_H_ | 10 #define NET_QUIC_QUIC_FEC_GROUP_INTERFACE_H_ |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 // The FEC data in the FEC packet. | 57 // The FEC data in the FEC packet. |
| 58 virtual const base::StringPiece PayloadParity() const = 0; | 58 virtual const base::StringPiece PayloadParity() const = 0; |
| 59 | 59 |
| 60 // Number of packets in the group. | 60 // Number of packets in the group. |
| 61 virtual QuicPacketCount NumReceivedPackets() const = 0; | 61 virtual QuicPacketCount NumReceivedPackets() const = 0; |
| 62 | 62 |
| 63 // Returns the effective encryption level of the FEC group. | 63 // Returns the effective encryption level of the FEC group. |
| 64 virtual EncryptionLevel EffectiveEncryptionLevel() const = 0; | 64 virtual EncryptionLevel EffectiveEncryptionLevel() const = 0; |
| 65 | 65 |
| 66 // Return the FEC group number of this group. |
| 67 virtual QuicFecGroupNumber FecGroupNumber() const = 0; |
| 68 |
| 66 // An optimized version of running |output| ^= |input|, where ^ is | 69 // An optimized version of running |output| ^= |input|, where ^ is |
| 67 // byte-by-byte XOR and both |output| and |input| are of size |size_in_bytes|. | 70 // byte-by-byte XOR and both |output| and |input| are of size |size_in_bytes|. |
| 68 static void XorBuffers(const char* input, size_t size_in_bytes, char* output); | 71 static void XorBuffers(const char* input, size_t size_in_bytes, char* output); |
| 69 | 72 |
| 70 protected: | 73 protected: |
| 71 QuicFecGroupInterface() {} | 74 QuicFecGroupInterface() {} |
| 72 | 75 |
| 73 private: | 76 private: |
| 74 DISALLOW_COPY_AND_ASSIGN(QuicFecGroupInterface); | 77 DISALLOW_COPY_AND_ASSIGN(QuicFecGroupInterface); |
| 75 }; | 78 }; |
| 76 | 79 |
| 77 } // namespace net | 80 } // namespace net |
| 78 | 81 |
| 79 #endif // NET_QUIC_QUIC_FEC_GROUP_INTERFACE_H_ | 82 #endif // NET_QUIC_QUIC_FEC_GROUP_INTERFACE_H_ |
| OLD | NEW |