| 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 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 static uint8 GetSequenceNumberFlags( | 423 static uint8 GetSequenceNumberFlags( |
| 424 QuicSequenceNumberLength sequence_number_length); | 424 QuicSequenceNumberLength sequence_number_length); |
| 425 | 425 |
| 426 static AckFrameInfo GetAckFrameInfo(const QuicAckFrame& frame); | 426 static AckFrameInfo GetAckFrameInfo(const QuicAckFrame& frame); |
| 427 | 427 |
| 428 bool AppendPacketHeader(const QuicPacketHeader& header, | 428 bool AppendPacketHeader(const QuicPacketHeader& header, |
| 429 QuicDataWriter* writer); | 429 QuicDataWriter* writer); |
| 430 bool AppendTypeByte(const QuicFrame& frame, | 430 bool AppendTypeByte(const QuicFrame& frame, |
| 431 bool last_frame_in_packet, | 431 bool last_frame_in_packet, |
| 432 QuicDataWriter* writer); | 432 QuicDataWriter* writer); |
| 433 bool AppendStreamFramePayload(const QuicStreamFrame& frame, | 433 bool AppendStreamFrame(const QuicStreamFrame& frame, |
| 434 bool last_frame_in_packet, | 434 bool last_frame_in_packet, |
| 435 QuicDataWriter* builder); | 435 QuicDataWriter* builder); |
| 436 bool AppendAckFramePayloadAndTypeByte(const QuicPacketHeader& header, | 436 bool AppendAckFrameAndTypeByte(const QuicPacketHeader& header, |
| 437 const QuicAckFrame& frame, | 437 const QuicAckFrame& frame, |
| 438 QuicDataWriter* builder); | 438 QuicDataWriter* builder); |
| 439 bool AppendQuicCongestionFeedbackFramePayload( | 439 bool AppendQuicCongestionFeedbackFrame( |
| 440 const QuicCongestionFeedbackFrame& frame, | 440 const QuicCongestionFeedbackFrame& frame, |
| 441 QuicDataWriter* builder); | 441 QuicDataWriter* builder); |
| 442 bool AppendRstStreamFramePayload(const QuicRstStreamFrame& frame, | 442 bool AppendRstStreamFrame(const QuicRstStreamFrame& frame, |
| 443 QuicDataWriter* builder); | 443 QuicDataWriter* builder); |
| 444 bool AppendConnectionCloseFramePayload( | 444 bool AppendConnectionCloseFrame(const QuicConnectionCloseFrame& frame, |
| 445 const QuicConnectionCloseFrame& frame, | 445 QuicDataWriter* builder); |
| 446 QuicDataWriter* builder); | 446 bool AppendGoAwayFrame(const QuicGoAwayFrame& frame, QuicDataWriter* writer); |
| 447 bool AppendGoAwayFramePayload(const QuicGoAwayFrame& frame, | |
| 448 QuicDataWriter* writer); | |
| 449 bool RaiseError(QuicErrorCode error); | 447 bool RaiseError(QuicErrorCode error); |
| 450 | 448 |
| 451 void set_error(QuicErrorCode error) { | 449 void set_error(QuicErrorCode error) { |
| 452 error_ = error; | 450 error_ = error; |
| 453 } | 451 } |
| 454 | 452 |
| 455 void set_detailed_error(const char* error) { | 453 void set_detailed_error(const char* error) { |
| 456 detailed_error_ = error; | 454 detailed_error_ = error; |
| 457 } | 455 } |
| 458 | 456 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 // The time this frames was created. Time written to the wire will be | 489 // The time this frames was created. Time written to the wire will be |
| 492 // written as a delta from this value. | 490 // written as a delta from this value. |
| 493 QuicTime creation_time_; | 491 QuicTime creation_time_; |
| 494 | 492 |
| 495 DISALLOW_COPY_AND_ASSIGN(QuicFramer); | 493 DISALLOW_COPY_AND_ASSIGN(QuicFramer); |
| 496 }; | 494 }; |
| 497 | 495 |
| 498 } // namespace net | 496 } // namespace net |
| 499 | 497 |
| 500 #endif // NET_QUIC_QUIC_FRAMER_H_ | 498 #endif // NET_QUIC_QUIC_FRAMER_H_ |
| OLD | NEW |