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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 void SetAlternativeDecrypter(QuicDecrypter* decrypter, | 339 void SetAlternativeDecrypter(QuicDecrypter* decrypter, |
340 EncryptionLevel level, | 340 EncryptionLevel level, |
341 bool latch_once_used); | 341 bool latch_once_used); |
342 | 342 |
343 const QuicDecrypter* decrypter() const; | 343 const QuicDecrypter* decrypter() const; |
344 const QuicDecrypter* alternative_decrypter() const; | 344 const QuicDecrypter* alternative_decrypter() const; |
345 | 345 |
346 // Changes the encrypter used for level |level| to |encrypter|. The function | 346 // Changes the encrypter used for level |level| to |encrypter|. The function |
347 // takes ownership of |encrypter|. | 347 // takes ownership of |encrypter|. |
348 void SetEncrypter(EncryptionLevel level, QuicEncrypter* encrypter); | 348 void SetEncrypter(EncryptionLevel level, QuicEncrypter* encrypter); |
349 const QuicEncrypter* encrypter(EncryptionLevel level) const; | |
350 | 349 |
351 // Returns a new encrypted packet, owned by the caller. | 350 // Returns a new encrypted packet, owned by the caller. |
352 QuicEncryptedPacket* EncryptPacket(EncryptionLevel level, | 351 QuicEncryptedPacket* EncryptPacket(EncryptionLevel level, |
353 QuicPacketSequenceNumber sequence_number, | 352 QuicPacketSequenceNumber sequence_number, |
354 const QuicPacket& packet); | 353 const QuicPacket& packet); |
355 | 354 |
356 // Returns the maximum length of plaintext that can be encrypted | 355 // Returns the maximum length of plaintext that can be encrypted |
357 // to ciphertext no larger than |ciphertext_size|. | 356 // to ciphertext no larger than |ciphertext_size|. |
358 size_t GetMaxPlaintextSize(size_t ciphertext_size); | 357 size_t GetMaxPlaintextSize(size_t ciphertext_size); |
359 | 358 |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 // The time delta computed for the last timestamp frame. This is relative to | 537 // The time delta computed for the last timestamp frame. This is relative to |
539 // the creation_time. | 538 // the creation_time. |
540 QuicTime::Delta last_timestamp_; | 539 QuicTime::Delta last_timestamp_; |
541 | 540 |
542 DISALLOW_COPY_AND_ASSIGN(QuicFramer); | 541 DISALLOW_COPY_AND_ASSIGN(QuicFramer); |
543 }; | 542 }; |
544 | 543 |
545 } // namespace net | 544 } // namespace net |
546 | 545 |
547 #endif // NET_QUIC_QUIC_FRAMER_H_ | 546 #endif // NET_QUIC_QUIC_FRAMER_H_ |
OLD | NEW |