| 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 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 | 715 |
| 716 // An alarm that fires when an ACK should be sent to the peer. | 716 // An alarm that fires when an ACK should be sent to the peer. |
| 717 scoped_ptr<QuicAlarm> ack_alarm_; | 717 scoped_ptr<QuicAlarm> ack_alarm_; |
| 718 // An alarm that fires when a packet needs to be retransmitted. | 718 // An alarm that fires when a packet needs to be retransmitted. |
| 719 scoped_ptr<QuicAlarm> retransmission_alarm_; | 719 scoped_ptr<QuicAlarm> retransmission_alarm_; |
| 720 // An alarm that fires when one or more FEC packets are to be discarded. | 720 // An alarm that fires when one or more FEC packets are to be discarded. |
| 721 scoped_ptr<QuicAlarm> abandon_fec_alarm_; | 721 scoped_ptr<QuicAlarm> abandon_fec_alarm_; |
| 722 // An alarm that is scheduled when the sent scheduler requires a | 722 // An alarm that is scheduled when the sent scheduler requires a |
| 723 // a delay before sending packets and fires when the packet may be sent. | 723 // a delay before sending packets and fires when the packet may be sent. |
| 724 scoped_ptr<QuicAlarm> send_alarm_; | 724 scoped_ptr<QuicAlarm> send_alarm_; |
| 725 // An alarm that is scheduled when the connection can still write and there |
| 726 // may be more data to send. |
| 727 scoped_ptr<QuicAlarm> resume_writes_alarm_; |
| 725 // An alarm that fires when the connection may have timed out. | 728 // An alarm that fires when the connection may have timed out. |
| 726 scoped_ptr<QuicAlarm> timeout_alarm_; | 729 scoped_ptr<QuicAlarm> timeout_alarm_; |
| 727 | 730 |
| 728 QuicConnectionVisitorInterface* visitor_; | 731 QuicConnectionVisitorInterface* visitor_; |
| 729 QuicConnectionDebugVisitorInterface* debug_visitor_; | 732 QuicConnectionDebugVisitorInterface* debug_visitor_; |
| 730 QuicPacketCreator packet_creator_; | 733 QuicPacketCreator packet_creator_; |
| 731 QuicPacketGenerator packet_generator_; | 734 QuicPacketGenerator packet_generator_; |
| 732 | 735 |
| 733 // Network idle time before we kill of this connection. | 736 // Network idle time before we kill of this connection. |
| 734 QuicTime::Delta idle_network_timeout_; | 737 QuicTime::Delta idle_network_timeout_; |
| 735 // Overall connection timeout. | 738 // Overall connection timeout. |
| 736 QuicTime::Delta overall_connection_timeout_; | 739 QuicTime::Delta overall_connection_timeout_; |
| 737 // Connection creation time. | 740 // Connection creation time. |
| 738 QuicTime creation_time_; | 741 QuicTime creation_time_; |
| 739 | 742 |
| 740 // Statistics for this session. | 743 // Statistics for this session. |
| 741 QuicConnectionStats stats_; | 744 QuicConnectionStats stats_; |
| 742 | 745 |
| 743 // The time that we got a packet for this connection. | 746 // The time that we got a packet for this connection. |
| 744 // This is used for timeouts, and does not indicate the packet was processed. | 747 // This is used for timeouts, and does not indicate the packet was processed. |
| 745 QuicTime time_of_last_received_packet_; | 748 QuicTime time_of_last_received_packet_; |
| 746 | 749 |
| 747 // The time that we last sent a packet for this connection. | 750 // The time that we last sent a packet for this connection. |
| 748 QuicTime time_of_last_sent_packet_; | 751 QuicTime time_of_last_sent_packet_; |
| 749 | 752 |
| 753 // Sequence number of the last packet guaranteed to be sent in packet sequence |
| 754 // number order. Not set when packets are queued, since that may cause |
| 755 // re-ordering. |
| 756 QuicPacketSequenceNumber sequence_number_of_last_inorder_packet_; |
| 757 |
| 750 // Congestion manager which controls the rate the connection sends packets | 758 // Congestion manager which controls the rate the connection sends packets |
| 751 // as well as collecting and generating congestion feedback. | 759 // as well as collecting and generating congestion feedback. |
| 752 QuicCongestionManager congestion_manager_; | 760 QuicCongestionManager congestion_manager_; |
| 753 | 761 |
| 754 // Sent packet manager which tracks the status of packets sent by this | 762 // Sent packet manager which tracks the status of packets sent by this |
| 755 // connection. | 763 // connection. |
| 756 QuicSentPacketManager sent_packet_manager_; | 764 QuicSentPacketManager sent_packet_manager_; |
| 757 | 765 |
| 758 // The state of connection in version negotiation finite state machine. | 766 // The state of connection in version negotiation finite state machine. |
| 759 QuicVersionNegotiationState version_negotiation_state_; | 767 QuicVersionNegotiationState version_negotiation_state_; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 784 | 792 |
| 785 // Only used to configure fake packet loss. | 793 // Only used to configure fake packet loss. |
| 786 SimpleRandom simple_random_; | 794 SimpleRandom simple_random_; |
| 787 | 795 |
| 788 DISALLOW_COPY_AND_ASSIGN(QuicConnection); | 796 DISALLOW_COPY_AND_ASSIGN(QuicConnection); |
| 789 }; | 797 }; |
| 790 | 798 |
| 791 } // namespace net | 799 } // namespace net |
| 792 | 800 |
| 793 #endif // NET_QUIC_QUIC_CONNECTION_H_ | 801 #endif // NET_QUIC_QUIC_CONNECTION_H_ |
| OLD | NEW |