Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: net/quic/core/quic_connection.h

Issue 2334363002: Landing Recent QUIC changes until Sat Sep 10 00:32:41 (Closed)
Patch Set: Revase Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/core/quic_alarm.cc ('k') | net/quic/core/quic_connection.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // The entity that handles framing writes for a Quic client or server. 5 // The entity that handles framing writes for a Quic client or server.
6 // Each QuicSession will have a connection associated with it. 6 // Each QuicSession will have a connection associated with it.
7 // 7 //
8 // On the server side, the Dispatcher handles the raw reads, and hands off 8 // On the server side, the Dispatcher handles the raw reads, and hands off
9 // packets via ProcessUdpPacket for framing and processing. 9 // packets via ProcessUdpPacket for framing and processing.
10 // 10 //
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 // connection becomes forward secure and hasn't received acks for all packets. 564 // connection becomes forward secure and hasn't received acks for all packets.
565 void NeuterUnencryptedPackets(); 565 void NeuterUnencryptedPackets();
566 566
567 // Changes the encrypter used for level |level| to |encrypter|. The function 567 // Changes the encrypter used for level |level| to |encrypter|. The function
568 // takes ownership of |encrypter|. 568 // takes ownership of |encrypter|.
569 void SetEncrypter(EncryptionLevel level, QuicEncrypter* encrypter); 569 void SetEncrypter(EncryptionLevel level, QuicEncrypter* encrypter);
570 570
571 // SetNonceForPublicHeader sets the nonce that will be transmitted in the 571 // SetNonceForPublicHeader sets the nonce that will be transmitted in the
572 // public header of each packet encrypted at the initial encryption level 572 // public header of each packet encrypted at the initial encryption level
573 // decrypted. This should only be called on the server side. 573 // decrypted. This should only be called on the server side.
574 void SetDiversificationNonce(const DiversificationNonce nonce); 574 void SetDiversificationNonce(const DiversificationNonce& nonce);
575 575
576 // SetDefaultEncryptionLevel sets the encryption level that will be applied 576 // SetDefaultEncryptionLevel sets the encryption level that will be applied
577 // to new packets. 577 // to new packets.
578 void SetDefaultEncryptionLevel(EncryptionLevel level); 578 void SetDefaultEncryptionLevel(EncryptionLevel level);
579 579
580 // SetDecrypter sets the primary decrypter, replacing any that already exists, 580 // SetDecrypter sets the primary decrypter, replacing any that already exists,
581 // and takes ownership. If an alternative decrypter is in place then the 581 // and takes ownership. If an alternative decrypter is in place then the
582 // function DCHECKs. This is intended for cases where one knows that future 582 // function DCHECKs. This is intended for cases where one knows that future
583 // packets will be using the new decrypter and the previous decrypter is now 583 // packets will be using the new decrypter and the previous decrypter is now
584 // obsolete. |level| indicates the encryption level of the new decrypter. 584 // obsolete. |level| indicates the encryption level of the new decrypter.
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 873
874 QuicFramer framer_; 874 QuicFramer framer_;
875 QuicConnectionHelperInterface* helper_; // Not owned. 875 QuicConnectionHelperInterface* helper_; // Not owned.
876 QuicAlarmFactory* alarm_factory_; // Not owned. 876 QuicAlarmFactory* alarm_factory_; // Not owned.
877 PerPacketOptions* per_packet_options_; // Not owned. 877 PerPacketOptions* per_packet_options_; // Not owned.
878 QuicPacketWriter* writer_; // Owned or not depending on |owns_writer_|. 878 QuicPacketWriter* writer_; // Owned or not depending on |owns_writer_|.
879 bool owns_writer_; 879 bool owns_writer_;
880 // Encryption level for new packets. Should only be changed via 880 // Encryption level for new packets. Should only be changed via
881 // SetDefaultEncryptionLevel(). 881 // SetDefaultEncryptionLevel().
882 EncryptionLevel encryption_level_; 882 EncryptionLevel encryption_level_;
883 bool has_forward_secure_encrypter_;
884 // The packet number of the first packet which will be encrypted with the
885 // foward-secure encrypter, even if the peer has not started sending
886 // forward-secure packets.
887 QuicPacketNumber first_required_forward_secure_packet_;
888 const QuicClock* clock_; 883 const QuicClock* clock_;
889 QuicRandom* random_generator_; 884 QuicRandom* random_generator_;
890 885
891 const QuicConnectionId connection_id_; 886 const QuicConnectionId connection_id_;
892 // Address on the last successfully processed packet received from the 887 // Address on the last successfully processed packet received from the
893 // client. 888 // client.
894 IPEndPoint self_address_; 889 IPEndPoint self_address_;
895 IPEndPoint peer_address_; 890 IPEndPoint peer_address_;
896 891
897 // Records change type when the peer initiates migration to a new peer 892 // Records change type when the peer initiates migration to a new peer
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
1108 // Indicates whether a write error is encountered currently. This is used to 1103 // Indicates whether a write error is encountered currently. This is used to
1109 // avoid infinite write errors. 1104 // avoid infinite write errors.
1110 bool write_error_occured_; 1105 bool write_error_occured_;
1111 1106
1112 DISALLOW_COPY_AND_ASSIGN(QuicConnection); 1107 DISALLOW_COPY_AND_ASSIGN(QuicConnection);
1113 }; 1108 };
1114 1109
1115 } // namespace net 1110 } // namespace net
1116 1111
1117 #endif // NET_QUIC_QUIC_CONNECTION_H_ 1112 #endif // NET_QUIC_QUIC_CONNECTION_H_
OLDNEW
« no previous file with comments | « net/quic/core/quic_alarm.cc ('k') | net/quic/core/quic_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698