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

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

Issue 11377096: Change from re-transmitting an packet with a retransmit number to sending a new packet with a new s… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « net/quic/quic_data_writer.cc ('k') | net/quic/quic_framer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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 <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 // Pass a data packet that was revived from FEC data into the framer 122 // Pass a data packet that was revived from FEC data into the framer
123 // for parsing. 123 // for parsing.
124 // Return true if the packet was processed succesfully. |payload| must be 124 // Return true if the packet was processed succesfully. |payload| must be
125 // the complete DECRYPTED payload of the revived packet. 125 // the complete DECRYPTED payload of the revived packet.
126 bool ProcessRevivedPacket(const QuicPacketHeader& header, 126 bool ProcessRevivedPacket(const QuicPacketHeader& header,
127 base::StringPiece payload); 127 base::StringPiece payload);
128 128
129 // Creates a new QuicPacket populated with the fields in |header| and 129 // Creates a new QuicPacket populated with the fields in |header| and
130 // |frames|. Assigns |*packet| to the address of the new object. 130 // |frames|. Assigns |*packet| to the address of the new object.
131 // Returns true upon success. 131 // Returns true upon success.
132 bool ConstructFragementDataPacket(const QuicPacketHeader& header, 132 bool ConstructFrameDataPacket(const QuicPacketHeader& header,
133 const QuicFrames& frames, 133 const QuicFrames& frames,
134 QuicPacket** packet); 134 QuicPacket** packet);
135 135
136 // Creates a new QuicPacket populated with the fields in |header| and 136 // Creates a new QuicPacket populated with the fields in |header| and
137 // |fec|. Assigns |*packet| to the address of the new object. 137 // |fec|. Assigns |*packet| to the address of the new object.
138 // Returns true upon success. 138 // Returns true upon success.
139 bool ConstructFecPacket(const QuicPacketHeader& header, 139 bool ConstructFecPacket(const QuicPacketHeader& header,
140 const QuicFecData& fec, 140 const QuicFecData& fec,
141 QuicPacket** packet); 141 QuicPacket** packet);
142 142
143 // Increments the retransmission count by one, and updates the authentication 143 void WriteTransmissionTime(QuicTransmissionTime time, QuicPacket* packet);
144 // hash accordingly.
145 void IncrementRetransmitCount(QuicPacket* packet);
146 144
147 uint8 GetRetransmitCount(QuicPacket* packet); 145 void WriteSequenceNumber(QuicPacketSequenceNumber sequence_number,
146 QuicPacket* packet);
148 147
149 void WriteTransmissionTime(QuicTransmissionTime time, QuicPacket* packet); 148 void WriteFecGroup(QuicFecGroupNumber fec_group, QuicPacket* packet);
150 149
151 // Returns a new encrypted packet, owned by the caller. 150 // Returns a new encrypted packet, owned by the caller.
152 QuicEncryptedPacket* EncryptPacket(const QuicPacket& packet); 151 QuicEncryptedPacket* EncryptPacket(const QuicPacket& packet);
153 152
154 // Returns the maximum length of plaintext that can be encrypted 153 // Returns the maximum length of plaintext that can be encrypted
155 // to ciphertext no larger than |ciphertext_size|. 154 // to ciphertext no larger than |ciphertext_size|.
156 size_t GetMaxPlaintextSize(size_t ciphertext_size); 155 size_t GetMaxPlaintextSize(size_t ciphertext_size);
157 156
158 const std::string& detailed_error() { return detailed_error_; } 157 const std::string& detailed_error() { return detailed_error_; }
159 158
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 scoped_ptr<QuicDecrypter> decrypter_; 205 scoped_ptr<QuicDecrypter> decrypter_;
207 // Encrypter used to encrypt packets via EncryptPacket(). 206 // Encrypter used to encrypt packets via EncryptPacket().
208 scoped_ptr<QuicEncrypter> encrypter_; 207 scoped_ptr<QuicEncrypter> encrypter_;
209 208
210 DISALLOW_COPY_AND_ASSIGN(QuicFramer); 209 DISALLOW_COPY_AND_ASSIGN(QuicFramer);
211 }; 210 };
212 211
213 } // namespace net 212 } // namespace net
214 213
215 #endif // NET_QUIC_QUIC_FRAMER_H_ 214 #endif // NET_QUIC_QUIC_FRAMER_H_
OLDNEW
« no previous file with comments | « net/quic/quic_data_writer.cc ('k') | net/quic/quic_framer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698