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 // 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 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
831 // other paths. | 831 // other paths. |
832 // TODO(fayang): complete OnPathClosed once QuicMultipathSentPacketManager and | 832 // TODO(fayang): complete OnPathClosed once QuicMultipathSentPacketManager and |
833 // QuicMultipathReceivedPacketManager are landed in QuicConnection. | 833 // QuicMultipathReceivedPacketManager are landed in QuicConnection. |
834 void OnPathClosed(QuicPathId path_id); | 834 void OnPathClosed(QuicPathId path_id); |
835 | 835 |
836 // Do any work which logically would be done in OnPacket but can not be | 836 // Do any work which logically would be done in OnPacket but can not be |
837 // safely done until the packet is validated. Returns true if packet can be | 837 // safely done until the packet is validated. Returns true if packet can be |
838 // handled, false otherwise. | 838 // handled, false otherwise. |
839 bool ProcessValidatedPacket(const QuicPacketHeader& header); | 839 bool ProcessValidatedPacket(const QuicPacketHeader& header); |
840 | 840 |
| 841 // Consider receiving crypto frame on non crypto stream as memory corruption. |
| 842 bool MaybeConsiderAsMemoryCorruption(const QuicStreamFrame& frame); |
| 843 |
841 QuicFramer framer_; | 844 QuicFramer framer_; |
842 QuicConnectionHelperInterface* helper_; // Not owned. | 845 QuicConnectionHelperInterface* helper_; // Not owned. |
843 QuicAlarmFactory* alarm_factory_; // Not owned. | 846 QuicAlarmFactory* alarm_factory_; // Not owned. |
844 PerPacketOptions* per_packet_options_; // Not owned. | 847 PerPacketOptions* per_packet_options_; // Not owned. |
845 QuicPacketWriter* writer_; // Owned or not depending on |owns_writer_|. | 848 QuicPacketWriter* writer_; // Owned or not depending on |owns_writer_|. |
846 bool owns_writer_; | 849 bool owns_writer_; |
847 // Encryption level for new packets. Should only be changed via | 850 // Encryption level for new packets. Should only be changed via |
848 // SetDefaultEncryptionLevel(). | 851 // SetDefaultEncryptionLevel(). |
849 EncryptionLevel encryption_level_; | 852 EncryptionLevel encryption_level_; |
850 bool has_forward_secure_encrypter_; | 853 bool has_forward_secure_encrypter_; |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1058 | 1061 |
1059 // If true, multipath is enabled for this connection. | 1062 // If true, multipath is enabled for this connection. |
1060 bool multipath_enabled_; | 1063 bool multipath_enabled_; |
1061 | 1064 |
1062 DISALLOW_COPY_AND_ASSIGN(QuicConnection); | 1065 DISALLOW_COPY_AND_ASSIGN(QuicConnection); |
1063 }; | 1066 }; |
1064 | 1067 |
1065 } // namespace net | 1068 } // namespace net |
1066 | 1069 |
1067 #endif // NET_QUIC_QUIC_CONNECTION_H_ | 1070 #endif // NET_QUIC_QUIC_CONNECTION_H_ |
OLD | NEW |