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

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

Issue 420313005: Land Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_0723
Patch Set: change QUIC packet size to 1350 Created 6 years, 4 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
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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 bool ProcessPacket(const QuicEncryptedPacket& packet); 248 bool ProcessPacket(const QuicEncryptedPacket& packet);
249 249
250 // Pass a data packet that was revived from FEC data into the framer 250 // Pass a data packet that was revived from FEC data into the framer
251 // for parsing. 251 // for parsing.
252 // Return true if the packet was processed succesfully. |payload| must be 252 // Return true if the packet was processed succesfully. |payload| must be
253 // the complete DECRYPTED payload of the revived packet. 253 // the complete DECRYPTED payload of the revived packet.
254 bool ProcessRevivedPacket(QuicPacketHeader* header, 254 bool ProcessRevivedPacket(QuicPacketHeader* header,
255 base::StringPiece payload); 255 base::StringPiece payload);
256 256
257 // Largest size in bytes of all stream frame fields without the payload. 257 // Largest size in bytes of all stream frame fields without the payload.
258 static size_t GetMinStreamFrameSize(QuicVersion version, 258 static size_t GetMinStreamFrameSize(QuicStreamId stream_id,
259 QuicStreamId stream_id,
260 QuicStreamOffset offset, 259 QuicStreamOffset offset,
261 bool last_frame_in_packet, 260 bool last_frame_in_packet,
262 InFecGroup is_in_fec_group); 261 InFecGroup is_in_fec_group);
263 // Size in bytes of all ack frame fields without the missing packets. 262 // Size in bytes of all ack frame fields without the missing packets.
264 static size_t GetMinAckFrameSize( 263 static size_t GetMinAckFrameSize(
265 QuicVersion version,
266 QuicSequenceNumberLength sequence_number_length, 264 QuicSequenceNumberLength sequence_number_length,
267 QuicSequenceNumberLength largest_observed_length); 265 QuicSequenceNumberLength largest_observed_length);
268 // Size in bytes of a stop waiting frame. 266 // Size in bytes of a stop waiting frame.
269 static size_t GetStopWaitingFrameSize( 267 static size_t GetStopWaitingFrameSize(
270 QuicSequenceNumberLength sequence_number_length); 268 QuicSequenceNumberLength sequence_number_length);
271 // Size in bytes of all reset stream frame without the error details. 269 // Size in bytes of all reset stream frame without the error details.
272 static size_t GetMinRstStreamFrameSize(QuicVersion quic_version); 270 static size_t GetMinRstStreamFrameSize();
273 // Size in bytes of all connection close frame fields without the error 271 // Size in bytes of all connection close frame fields without the error
274 // details and the missing packets from the enclosed ack frame. 272 // details and the missing packets from the enclosed ack frame.
275 static size_t GetMinConnectionCloseFrameSize(); 273 static size_t GetMinConnectionCloseFrameSize();
276 // Size in bytes of all GoAway frame fields without the reason phrase. 274 // Size in bytes of all GoAway frame fields without the reason phrase.
277 static size_t GetMinGoAwayFrameSize(); 275 static size_t GetMinGoAwayFrameSize();
278 // Size in bytes of all WindowUpdate frame fields. 276 // Size in bytes of all WindowUpdate frame fields.
279 static size_t GetWindowUpdateFrameSize(); 277 static size_t GetWindowUpdateFrameSize();
280 // Size in bytes of all Blocked frame fields. 278 // Size in bytes of all Blocked frame fields.
281 static size_t GetBlockedFrameSize(); 279 static size_t GetBlockedFrameSize();
282 // Size in bytes required to serialize the stream id. 280 // Size in bytes required to serialize the stream id.
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 bool ProcessPublicHeader(QuicPacketPublicHeader* header); 401 bool ProcessPublicHeader(QuicPacketPublicHeader* header);
404 402
405 bool ProcessPacketHeader(QuicPacketHeader* header, 403 bool ProcessPacketHeader(QuicPacketHeader* header,
406 const QuicEncryptedPacket& packet); 404 const QuicEncryptedPacket& packet);
407 405
408 bool ProcessPacketSequenceNumber( 406 bool ProcessPacketSequenceNumber(
409 QuicSequenceNumberLength sequence_number_length, 407 QuicSequenceNumberLength sequence_number_length,
410 QuicPacketSequenceNumber* sequence_number); 408 QuicPacketSequenceNumber* sequence_number);
411 bool ProcessFrameData(const QuicPacketHeader& header); 409 bool ProcessFrameData(const QuicPacketHeader& header);
412 bool ProcessStreamFrame(uint8 frame_type, QuicStreamFrame* frame); 410 bool ProcessStreamFrame(uint8 frame_type, QuicStreamFrame* frame);
413 bool ProcessAckFrame(const QuicPacketHeader& header, 411 bool ProcessAckFrame(uint8 frame_type, QuicAckFrame* frame);
414 uint8 frame_type,
415 QuicAckFrame* frame);
416 bool ProcessReceivedInfo(uint8 frame_type, ReceivedPacketInfo* received_info);
417 bool ProcessStopWaitingFrame(const QuicPacketHeader& public_header, 412 bool ProcessStopWaitingFrame(const QuicPacketHeader& public_header,
418 QuicStopWaitingFrame* stop_waiting); 413 QuicStopWaitingFrame* stop_waiting);
419 bool ProcessQuicCongestionFeedbackFrame( 414 bool ProcessQuicCongestionFeedbackFrame(
420 QuicCongestionFeedbackFrame* congestion_feedback); 415 QuicCongestionFeedbackFrame* congestion_feedback);
421 bool ProcessRstStreamFrame(QuicRstStreamFrame* frame); 416 bool ProcessRstStreamFrame(QuicRstStreamFrame* frame);
422 bool ProcessConnectionCloseFrame(QuicConnectionCloseFrame* frame); 417 bool ProcessConnectionCloseFrame(QuicConnectionCloseFrame* frame);
423 bool ProcessGoAwayFrame(QuicGoAwayFrame* frame); 418 bool ProcessGoAwayFrame(QuicGoAwayFrame* frame);
424 bool ProcessWindowUpdateFrame(QuicWindowUpdateFrame* frame); 419 bool ProcessWindowUpdateFrame(QuicWindowUpdateFrame* frame);
425 bool ProcessBlockedFrame(QuicBlockedFrame* frame); 420 bool ProcessBlockedFrame(QuicBlockedFrame* frame);
426 421
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 // The time this frames was created. Time written to the wire will be 527 // The time this frames was created. Time written to the wire will be
533 // written as a delta from this value. 528 // written as a delta from this value.
534 QuicTime creation_time_; 529 QuicTime creation_time_;
535 530
536 DISALLOW_COPY_AND_ASSIGN(QuicFramer); 531 DISALLOW_COPY_AND_ASSIGN(QuicFramer);
537 }; 532 };
538 533
539 } // namespace net 534 } // namespace net
540 535
541 #endif // NET_QUIC_QUIC_FRAMER_H_ 536 #endif // NET_QUIC_QUIC_FRAMER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698