| 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 // |
| 11 // On the client side, the Connection handles the raw reads, as well as the | 11 // On the client side, the Connection handles the raw reads, as well as the |
| 12 // processing. | 12 // processing. |
| 13 // | 13 // |
| 14 // Note: this class is not thread-safe. | 14 // Note: this class is not thread-safe. |
| 15 | 15 |
| 16 #ifndef NET_QUIC_QUIC_CONNECTION_H_ | 16 #ifndef NET_QUIC_QUIC_CONNECTION_H_ |
| 17 #define NET_QUIC_QUIC_CONNECTION_H_ | 17 #define NET_QUIC_QUIC_CONNECTION_H_ |
| 18 | 18 |
| 19 #include <stddef.h> | 19 #include <stddef.h> |
| 20 #include <deque> | 20 #include <deque> |
| 21 #include <list> | 21 #include <list> |
| 22 #include <map> | 22 #include <map> |
| 23 #include <queue> | 23 #include <queue> |
| 24 #include <string> | 24 #include <string> |
| 25 #include <vector> | 25 #include <vector> |
| 26 | 26 |
| 27 #include "base/basictypes.h" |
| 27 #include "base/logging.h" | 28 #include "base/logging.h" |
| 28 #include "net/base/iovec.h" | 29 #include "net/base/iovec.h" |
| 29 #include "net/base/ip_endpoint.h" | 30 #include "net/base/ip_endpoint.h" |
| 30 #include "net/quic/iovector.h" | 31 #include "net/quic/iovector.h" |
| 31 #include "net/quic/quic_ack_notifier.h" | 32 #include "net/quic/quic_ack_notifier.h" |
| 32 #include "net/quic/quic_ack_notifier_manager.h" | 33 #include "net/quic/quic_ack_notifier_manager.h" |
| 33 #include "net/quic/quic_alarm.h" | 34 #include "net/quic/quic_alarm.h" |
| 34 #include "net/quic/quic_blocked_writer_interface.h" | 35 #include "net/quic/quic_blocked_writer_interface.h" |
| 35 #include "net/quic/quic_connection_stats.h" | 36 #include "net/quic/quic_connection_stats.h" |
| 36 #include "net/quic/quic_packet_creator.h" | 37 #include "net/quic/quic_packet_creator.h" |
| (...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 682 QuicPacketSequenceNumber first_required_forward_secure_packet_; | 683 QuicPacketSequenceNumber first_required_forward_secure_packet_; |
| 683 const QuicClock* clock_; | 684 const QuicClock* clock_; |
| 684 QuicRandom* random_generator_; | 685 QuicRandom* random_generator_; |
| 685 | 686 |
| 686 const QuicConnectionId connection_id_; | 687 const QuicConnectionId connection_id_; |
| 687 // Address on the last successfully processed packet received from the | 688 // Address on the last successfully processed packet received from the |
| 688 // client. | 689 // client. |
| 689 IPEndPoint self_address_; | 690 IPEndPoint self_address_; |
| 690 IPEndPoint peer_address_; | 691 IPEndPoint peer_address_; |
| 691 // Used to store latest peer port to possibly migrate to later. | 692 // Used to store latest peer port to possibly migrate to later. |
| 692 int migrating_peer_port_; | 693 uint16 migrating_peer_port_; |
| 693 | 694 |
| 694 // True if the last packet has gotten far enough in the framer to be | 695 // True if the last packet has gotten far enough in the framer to be |
| 695 // decrypted. | 696 // decrypted. |
| 696 bool last_packet_decrypted_; | 697 bool last_packet_decrypted_; |
| 697 bool last_packet_revived_; // True if the last packet was revived from FEC. | 698 bool last_packet_revived_; // True if the last packet was revived from FEC. |
| 698 QuicByteCount last_size_; // Size of the last received packet. | 699 QuicByteCount last_size_; // Size of the last received packet. |
| 699 EncryptionLevel last_decrypted_packet_level_; | 700 EncryptionLevel last_decrypted_packet_level_; |
| 700 QuicPacketHeader last_header_; | 701 QuicPacketHeader last_header_; |
| 701 std::vector<QuicStreamFrame> last_stream_frames_; | 702 std::vector<QuicStreamFrame> last_stream_frames_; |
| 702 std::vector<QuicAckFrame> last_ack_frames_; | 703 std::vector<QuicAckFrame> last_ack_frames_; |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 832 | 833 |
| 833 // True if this is a secure QUIC connection. | 834 // True if this is a secure QUIC connection. |
| 834 bool is_secure_; | 835 bool is_secure_; |
| 835 | 836 |
| 836 DISALLOW_COPY_AND_ASSIGN(QuicConnection); | 837 DISALLOW_COPY_AND_ASSIGN(QuicConnection); |
| 837 }; | 838 }; |
| 838 | 839 |
| 839 } // namespace net | 840 } // namespace net |
| 840 | 841 |
| 841 #endif // NET_QUIC_QUIC_CONNECTION_H_ | 842 #endif // NET_QUIC_QUIC_CONNECTION_H_ |
| OLD | NEW |