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

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

Issue 15937012: Land Recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Small bug fixes Created 7 years, 6 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 | Annotate | Revision Log
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 // 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. Provided the ability 6 // that have been seen, and the running parity. Provided the ability
7 // to revive a dropped packet. 7 // to revive a dropped packet.
8 8
9 #ifndef NET_QUIC_QUIC_FEC_GROUP_H_ 9 #ifndef NET_QUIC_QUIC_FEC_GROUP_H_
10 #define NET_QUIC_QUIC_FEC_GROUP_H_ 10 #define NET_QUIC_QUIC_FEC_GROUP_H_
(...skipping 11 matching lines...) Expand all
22 ~QuicFecGroup(); 22 ~QuicFecGroup();
23 23
24 // Updates the FEC group based on the delivery of a data packet. 24 // Updates the FEC group based on the delivery of a data packet.
25 // Returns false if this packet has already been seen, true otherwise. 25 // Returns false if this packet has already been seen, true otherwise.
26 bool Update(const QuicPacketHeader& header, 26 bool Update(const QuicPacketHeader& header,
27 base::StringPiece decrypted_payload); 27 base::StringPiece decrypted_payload);
28 28
29 // Updates the FEC group based on the delivery of an FEC packet. 29 // Updates the FEC group based on the delivery of an FEC packet.
30 // Returns false if this packet has already been seen or if it does 30 // Returns false if this packet has already been seen or if it does
31 // not claim to protect all the packets previously seen in this group. 31 // not claim to protect all the packets previously seen in this group.
32 // |fec_packet_entropy|: XOR of entropy of all packets in the fec group.
32 bool UpdateFec(QuicPacketSequenceNumber fec_packet_sequence_number, 33 bool UpdateFec(QuicPacketSequenceNumber fec_packet_sequence_number,
33 bool fec_entropy_flag, 34 bool fec_packet_entropy,
34 const QuicFecData& fec); 35 const QuicFecData& fec);
35 36
36 // Returns true if a packet can be revived from this FEC group. 37 // Returns true if a packet can be revived from this FEC group.
37 bool CanRevive() const; 38 bool CanRevive() const;
38 39
39 // Returns true if all packets (FEC and data) from this FEC group have been 40 // Returns true if all packets (FEC and data) from this FEC group have been
40 // seen or revived 41 // seen or revived
41 bool IsFinished() const; 42 bool IsFinished() const;
42 43
43 // Revives the missing packet from this FEC group. This may return a packet 44 // Revives the missing packet from this FEC group. This may return a packet
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 char payload_parity_[kMaxPacketSize]; 89 char payload_parity_[kMaxPacketSize];
89 size_t payload_parity_len_; 90 size_t payload_parity_len_;
90 bool entropy_parity_; 91 bool entropy_parity_;
91 92
92 DISALLOW_COPY_AND_ASSIGN(QuicFecGroup); 93 DISALLOW_COPY_AND_ASSIGN(QuicFecGroup);
93 }; 94 };
94 95
95 } // namespace net 96 } // namespace net
96 97
97 #endif // NET_QUIC_QUIC_FEC_GROUP_H_ 98 #endif // NET_QUIC_QUIC_FEC_GROUP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698