| 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 #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 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 QuicPacketSequenceNumber packet_sequence_number, | 452 QuicPacketSequenceNumber packet_sequence_number, |
| 453 QuicDataWriter* writer); | 453 QuicDataWriter* writer); |
| 454 | 454 |
| 455 static uint8 GetSequenceNumberFlags( | 455 static uint8 GetSequenceNumberFlags( |
| 456 QuicSequenceNumberLength sequence_number_length); | 456 QuicSequenceNumberLength sequence_number_length); |
| 457 | 457 |
| 458 static AckFrameInfo GetAckFrameInfo(const QuicAckFrame& frame); | 458 static AckFrameInfo GetAckFrameInfo(const QuicAckFrame& frame); |
| 459 | 459 |
| 460 // The Append* methods attempt to write the provided header or frame using the | 460 // The Append* methods attempt to write the provided header or frame using the |
| 461 // |writer|, and return true if successful. | 461 // |writer|, and return true if successful. |
| 462 |
| 463 // If header.public_header.version_flag is set, the version in the |
| 464 // packet will be set -- but it will be set from quic_version_ not |
| 465 // header.public_header.versions. |
| 462 bool AppendPacketHeader(const QuicPacketHeader& header, | 466 bool AppendPacketHeader(const QuicPacketHeader& header, |
| 463 QuicDataWriter* writer); | 467 QuicDataWriter* writer); |
| 464 bool AppendTypeByte(const QuicFrame& frame, | 468 bool AppendTypeByte(const QuicFrame& frame, |
| 465 bool last_frame_in_packet, | 469 bool last_frame_in_packet, |
| 466 QuicDataWriter* writer); | 470 QuicDataWriter* writer); |
| 467 bool AppendStreamFrame(const QuicStreamFrame& frame, | 471 bool AppendStreamFrame(const QuicStreamFrame& frame, |
| 468 bool last_frame_in_packet, | 472 bool last_frame_in_packet, |
| 469 QuicDataWriter* builder); | 473 QuicDataWriter* builder); |
| 470 bool AppendAckFrameAndTypeByte(const QuicPacketHeader& header, | 474 bool AppendAckFrameAndTypeByte(const QuicPacketHeader& header, |
| 471 const QuicAckFrame& frame, | 475 const QuicAckFrame& frame, |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 // The time delta computed for the last timestamp frame. This is relative to | 541 // The time delta computed for the last timestamp frame. This is relative to |
| 538 // the creation_time. | 542 // the creation_time. |
| 539 QuicTime::Delta last_timestamp_; | 543 QuicTime::Delta last_timestamp_; |
| 540 | 544 |
| 541 DISALLOW_COPY_AND_ASSIGN(QuicFramer); | 545 DISALLOW_COPY_AND_ASSIGN(QuicFramer); |
| 542 }; | 546 }; |
| 543 | 547 |
| 544 } // namespace net | 548 } // namespace net |
| 545 | 549 |
| 546 #endif // NET_QUIC_QUIC_FRAMER_H_ | 550 #endif // NET_QUIC_QUIC_FRAMER_H_ |
| OLD | NEW |