| 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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 // Returns a QuicPacket* that is owned by the caller, and is populated with | 297 // Returns a QuicPacket* that is owned by the caller, and is populated with |
| 298 // the fields in |header| and |fec|. Returns nullptr if the packet could | 298 // the fields in |header| and |fec|. Returns nullptr if the packet could |
| 299 // not be created. | 299 // not be created. |
| 300 QuicPacket* BuildFecPacket(const QuicPacketHeader& header, | 300 QuicPacket* BuildFecPacket(const QuicPacketHeader& header, |
| 301 base::StringPiece redundancy); | 301 base::StringPiece redundancy); |
| 302 | 302 |
| 303 // Returns a new public reset packet, owned by the caller. | 303 // Returns a new public reset packet, owned by the caller. |
| 304 static QuicEncryptedPacket* BuildPublicResetPacket( | 304 static QuicEncryptedPacket* BuildPublicResetPacket( |
| 305 const QuicPublicResetPacket& packet); | 305 const QuicPublicResetPacket& packet); |
| 306 | 306 |
| 307 QuicEncryptedPacket* BuildVersionNegotiationPacket( | 307 // Returns a new version negotiation packet, owned by the caller. |
| 308 const QuicPacketPublicHeader& header, | 308 static QuicEncryptedPacket* BuildVersionNegotiationPacket( |
| 309 const QuicVersionVector& supported_versions); | 309 QuicConnectionId connection_id, |
| 310 const QuicVersionVector& versions); |
| 310 | 311 |
| 311 // SetDecrypter sets the primary decrypter, replacing any that already exists, | 312 // SetDecrypter sets the primary decrypter, replacing any that already exists, |
| 312 // and takes ownership. If an alternative decrypter is in place then the | 313 // and takes ownership. If an alternative decrypter is in place then the |
| 313 // function DCHECKs. This is intended for cases where one knows that future | 314 // function DCHECKs. This is intended for cases where one knows that future |
| 314 // packets will be using the new decrypter and the previous decrypter is now | 315 // packets will be using the new decrypter and the previous decrypter is now |
| 315 // obsolete. |level| indicates the encryption level of the new decrypter. | 316 // obsolete. |level| indicates the encryption level of the new decrypter. |
| 316 void SetDecrypter(EncryptionLevel level, QuicDecrypter* decrypter); | 317 void SetDecrypter(EncryptionLevel level, QuicDecrypter* decrypter); |
| 317 | 318 |
| 318 // SetAlternativeDecrypter sets a decrypter that may be used to decrypt | 319 // SetAlternativeDecrypter sets a decrypter that may be used to decrypt |
| 319 // future packets and takes ownership of it. |level| indicates the encryption | 320 // future packets and takes ownership of it. |level| indicates the encryption |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 // The time delta computed for the last timestamp frame. This is relative to | 544 // The time delta computed for the last timestamp frame. This is relative to |
| 544 // the creation_time. | 545 // the creation_time. |
| 545 QuicTime::Delta last_timestamp_; | 546 QuicTime::Delta last_timestamp_; |
| 546 | 547 |
| 547 DISALLOW_COPY_AND_ASSIGN(QuicFramer); | 548 DISALLOW_COPY_AND_ASSIGN(QuicFramer); |
| 548 }; | 549 }; |
| 549 | 550 |
| 550 } // namespace net | 551 } // namespace net |
| 551 | 552 |
| 552 #endif // NET_QUIC_QUIC_FRAMER_H_ | 553 #endif // NET_QUIC_QUIC_FRAMER_H_ |
| OLD | NEW |