| 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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 | 299 |
| 300 // Returns the associated data from the encrypted packet |encrypted| as a | 300 // Returns the associated data from the encrypted packet |encrypted| as a |
| 301 // stringpiece. | 301 // stringpiece. |
| 302 static base::StringPiece GetAssociatedDataFromEncryptedPacket( | 302 static base::StringPiece GetAssociatedDataFromEncryptedPacket( |
| 303 const QuicEncryptedPacket& encrypted, | 303 const QuicEncryptedPacket& encrypted, |
| 304 QuicConnectionIdLength connection_id_length, | 304 QuicConnectionIdLength connection_id_length, |
| 305 bool includes_version, | 305 bool includes_version, |
| 306 QuicSequenceNumberLength sequence_number_length); | 306 QuicSequenceNumberLength sequence_number_length); |
| 307 | 307 |
| 308 // Returns a SerializedPacket whose |packet| member is owned by the caller, | 308 // Returns a SerializedPacket whose |packet| member is owned by the caller, |
| 309 // is created from the first |num_frames| frames, or is NULL if the packet | 309 // is created from the first |num_frames| frames, or is nullptr if the packet |
| 310 // could not be created. The packet must be of size |packet_size|. | 310 // could not be created. The packet must be of size |packet_size|. |
| 311 SerializedPacket BuildDataPacket(const QuicPacketHeader& header, | 311 SerializedPacket BuildDataPacket(const QuicPacketHeader& header, |
| 312 const QuicFrames& frames, | 312 const QuicFrames& frames, |
| 313 size_t packet_size); | 313 size_t packet_size); |
| 314 | 314 |
| 315 // Returns a SerializedPacket whose |packet| member is owned by the caller, | 315 // Returns a SerializedPacket whose |packet| member is owned by the caller, |
| 316 // and is populated with the fields in |header| and |fec|, or is NULL if the | 316 // and is populated with the fields in |header| and |fec|, or is nullptr if |
| 317 // packet could not be created. | 317 // the packet could not be created. |
| 318 SerializedPacket BuildFecPacket(const QuicPacketHeader& header, | 318 SerializedPacket BuildFecPacket(const QuicPacketHeader& header, |
| 319 const QuicFecData& fec); | 319 const QuicFecData& fec); |
| 320 | 320 |
| 321 // Returns a new public reset packet, owned by the caller. | 321 // Returns a new public reset packet, owned by the caller. |
| 322 static QuicEncryptedPacket* BuildPublicResetPacket( | 322 static QuicEncryptedPacket* BuildPublicResetPacket( |
| 323 const QuicPublicResetPacket& packet); | 323 const QuicPublicResetPacket& packet); |
| 324 | 324 |
| 325 QuicEncryptedPacket* BuildVersionNegotiationPacket( | 325 QuicEncryptedPacket* BuildVersionNegotiationPacket( |
| 326 const QuicPacketPublicHeader& header, | 326 const QuicPacketPublicHeader& header, |
| 327 const QuicVersionVector& supported_versions); | 327 const QuicVersionVector& supported_versions); |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 539 // The time delta computed for the last timestamp frame. This is relative to | 539 // The time delta computed for the last timestamp frame. This is relative to |
| 540 // the creation_time. | 540 // the creation_time. |
| 541 QuicTime::Delta last_timestamp_; | 541 QuicTime::Delta last_timestamp_; |
| 542 | 542 |
| 543 DISALLOW_COPY_AND_ASSIGN(QuicFramer); | 543 DISALLOW_COPY_AND_ASSIGN(QuicFramer); |
| 544 }; | 544 }; |
| 545 | 545 |
| 546 } // namespace net | 546 } // namespace net |
| 547 | 547 |
| 548 #endif // NET_QUIC_QUIC_FRAMER_H_ | 548 #endif // NET_QUIC_QUIC_FRAMER_H_ |
| OLD | NEW |