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

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

Issue 11958018: Queueing QUIC frames to be resent instead of packets and packing RST frames with acks and congestio… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 #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 <map> 10 #include <map>
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 // Too many streams already open. 143 // Too many streams already open.
144 QUIC_TOO_MANY_OPEN_STREAMS, 144 QUIC_TOO_MANY_OPEN_STREAMS,
145 145
146 // We hit our prenegotiated (or default) timeout 146 // We hit our prenegotiated (or default) timeout
147 QUIC_CONNECTION_TIMED_OUT, 147 QUIC_CONNECTION_TIMED_OUT,
148 148
149 // Crypto errors. 149 // Crypto errors.
150 150
151 // Handshake message contained out of order tags. 151 // Handshake message contained out of order tags.
152 QUIC_CRYPTO_TAGS_OUT_OF_ORDER, 152 QUIC_CRYPTO_TAGS_OUT_OF_ORDER,
153 // Handshake message contained too many entires. 153 // Handshake message contained too many entries.
154 QUIC_CRYPTO_TOO_MANY_ENTRIES, 154 QUIC_CRYPTO_TOO_MANY_ENTRIES,
155 // Handshake message contained an invalid value length. 155 // Handshake message contained an invalid value length.
156 QUIC_CRYPTO_INVALID_VALUE_LENGTH, 156 QUIC_CRYPTO_INVALID_VALUE_LENGTH,
157 // A crypto message was received after the handshake was complete. 157 // A crypto message was received after the handshake was complete.
158 QUIC_CRYPTO_MESSAGE_AFTER_HANDSHAKE_COMPLETE, 158 QUIC_CRYPTO_MESSAGE_AFTER_HANDSHAKE_COMPLETE,
159 // A crypto message was receieved with an illegal message tag. 159 // A crypto message was receieved with an illegal message tag.
160 QUIC_INVALID_CRYPTO_MESSAGE_TYPE, 160 QUIC_INVALID_CRYPTO_MESSAGE_TYPE,
161 161
162 }; 162 };
163 163
164 struct NET_EXPORT_PRIVATE QuicPacketHeader { 164 struct NET_EXPORT_PRIVATE QuicPacketHeader {
165 // Includes the ConnectionHeader and CongestionMonitoredHeader 165 // Includes the ConnectionHeader and CongestionMonitoredHeader
166 // from the design docs, as well as some elements of DecryptedData. 166 // from the design docs, as well as some elements of DecryptedData.
167 QuicGuid guid; 167 QuicGuid guid;
168 QuicPacketSequenceNumber packet_sequence_number; 168 QuicPacketSequenceNumber packet_sequence_number;
169 QuicPacketFlags flags; 169 QuicPacketFlags flags;
170 QuicFecGroupNumber fec_group; 170 QuicFecGroupNumber fec_group;
171 }; 171 };
172 172
173 struct NET_EXPORT_PRIVATE QuicStreamFrame { 173 struct NET_EXPORT_PRIVATE QuicStreamFrame {
174 QuicStreamFrame(); 174 QuicStreamFrame();
175 QuicStreamFrame(QuicStreamId stream_id, 175 QuicStreamFrame(QuicStreamId stream_id,
176 bool fin, 176 bool fin,
177 uint64 offset, 177 QuicStreamOffset offset,
178 base::StringPiece data); 178 base::StringPiece data);
179 179
180 QuicStreamId stream_id; 180 QuicStreamId stream_id;
181 bool fin; 181 bool fin;
182 uint64 offset; 182 QuicStreamOffset offset; // Location of this data in the stream.
183 base::StringPiece data; 183 base::StringPiece data;
184 }; 184 };
185 185
186 // TODO(ianswett): Re-evaluate the trade-offs of hash_set vs set when framing 186 // TODO(ianswett): Re-evaluate the trade-offs of hash_set vs set when framing
187 // is finalized. 187 // is finalized.
188 typedef std::set<QuicPacketSequenceNumber> SequenceSet; 188 typedef std::set<QuicPacketSequenceNumber> SequenceSet;
189 // TODO(pwestin): Add a way to enforce the max size of this map. 189 // TODO(pwestin): Add a way to enforce the max size of this map.
190 typedef std::map<QuicPacketSequenceNumber, QuicTime> TimeMap; 190 typedef std::map<QuicPacketSequenceNumber, QuicTime> TimeMap;
191 191
192 struct NET_EXPORT_PRIVATE ReceivedPacketInfo { 192 struct NET_EXPORT_PRIVATE ReceivedPacketInfo {
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 return base::StringPiece(data() + kStartOfHashData, kStartOfEncryptedData); 433 return base::StringPiece(data() + kStartOfHashData, kStartOfEncryptedData);
434 } 434 }
435 435
436 private: 436 private:
437 DISALLOW_COPY_AND_ASSIGN(QuicEncryptedPacket); 437 DISALLOW_COPY_AND_ASSIGN(QuicEncryptedPacket);
438 }; 438 };
439 439
440 } // namespace net 440 } // namespace net
441 441
442 #endif // NET_QUIC_QUIC_PROTOCOL_H_ 442 #endif // NET_QUIC_QUIC_PROTOCOL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698