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 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
698 | 698 |
699 // An alarm that fires when an ACK should be sent to the peer. | 699 // An alarm that fires when an ACK should be sent to the peer. |
700 scoped_ptr<QuicAlarm> ack_alarm_; | 700 scoped_ptr<QuicAlarm> ack_alarm_; |
701 // An alarm that fires when a packet needs to be retransmitted. | 701 // An alarm that fires when a packet needs to be retransmitted. |
702 scoped_ptr<QuicAlarm> retransmission_alarm_; | 702 scoped_ptr<QuicAlarm> retransmission_alarm_; |
703 // An alarm that fires when one or more FEC packets are to be discarded. | 703 // An alarm that fires when one or more FEC packets are to be discarded. |
704 scoped_ptr<QuicAlarm> abandon_fec_alarm_; | 704 scoped_ptr<QuicAlarm> abandon_fec_alarm_; |
705 // An alarm that is scheduled when the sent scheduler requires a | 705 // An alarm that is scheduled when the sent scheduler requires a |
706 // a delay before sending packets and fires when the packet may be sent. | 706 // a delay before sending packets and fires when the packet may be sent. |
707 scoped_ptr<QuicAlarm> send_alarm_; | 707 scoped_ptr<QuicAlarm> send_alarm_; |
| 708 // An alarm that is scheduled when the connection can still write and there |
| 709 // may be more data to send. |
| 710 scoped_ptr<QuicAlarm> resume_writes_alarm_; |
708 // An alarm that fires when the connection may have timed out. | 711 // An alarm that fires when the connection may have timed out. |
709 scoped_ptr<QuicAlarm> timeout_alarm_; | 712 scoped_ptr<QuicAlarm> timeout_alarm_; |
710 | 713 |
711 QuicConnectionVisitorInterface* visitor_; | 714 QuicConnectionVisitorInterface* visitor_; |
712 QuicConnectionDebugVisitorInterface* debug_visitor_; | 715 QuicConnectionDebugVisitorInterface* debug_visitor_; |
713 QuicPacketCreator packet_creator_; | 716 QuicPacketCreator packet_creator_; |
714 QuicPacketGenerator packet_generator_; | 717 QuicPacketGenerator packet_generator_; |
715 | 718 |
716 // Network idle time before we kill of this connection. | 719 // Network idle time before we kill of this connection. |
717 QuicTime::Delta idle_network_timeout_; | 720 QuicTime::Delta idle_network_timeout_; |
718 // Overall connection timeout. | 721 // Overall connection timeout. |
719 QuicTime::Delta overall_connection_timeout_; | 722 QuicTime::Delta overall_connection_timeout_; |
720 // Connection creation time. | 723 // Connection creation time. |
721 QuicTime creation_time_; | 724 QuicTime creation_time_; |
722 | 725 |
723 // Statistics for this session. | 726 // Statistics for this session. |
724 QuicConnectionStats stats_; | 727 QuicConnectionStats stats_; |
725 | 728 |
726 // The time that we got a packet for this connection. | 729 // The time that we got a packet for this connection. |
727 // This is used for timeouts, and does not indicate the packet was processed. | 730 // This is used for timeouts, and does not indicate the packet was processed. |
728 QuicTime time_of_last_received_packet_; | 731 QuicTime time_of_last_received_packet_; |
729 | 732 |
730 // The time that we last sent a packet for this connection. | 733 // The time that we last sent a packet for this connection. |
731 QuicTime time_of_last_sent_packet_; | 734 QuicTime time_of_last_sent_packet_; |
732 | 735 |
| 736 // Sequence number of the last packet guaranteed to be sent in packet sequence |
| 737 // number order. Not set when packets are queued, since that may cause |
| 738 // re-ordering. |
| 739 QuicPacketSequenceNumber sequence_number_of_last_inorder_packet_; |
| 740 |
733 // Congestion manager which controls the rate the connection sends packets | 741 // Congestion manager which controls the rate the connection sends packets |
734 // as well as collecting and generating congestion feedback. | 742 // as well as collecting and generating congestion feedback. |
735 QuicCongestionManager congestion_manager_; | 743 QuicCongestionManager congestion_manager_; |
736 | 744 |
737 // Sent packet manager which tracks the status of packets sent by this | 745 // Sent packet manager which tracks the status of packets sent by this |
738 // connection. | 746 // connection. |
739 QuicSentPacketManager sent_packet_manager_; | 747 QuicSentPacketManager sent_packet_manager_; |
740 | 748 |
741 // The state of connection in version negotiation finite state machine. | 749 // The state of connection in version negotiation finite state machine. |
742 QuicVersionNegotiationState version_negotiation_state_; | 750 QuicVersionNegotiationState version_negotiation_state_; |
(...skipping 10 matching lines...) Expand all Loading... |
753 | 761 |
754 // True if the last ack received from the peer may have been truncated. False | 762 // True if the last ack received from the peer may have been truncated. False |
755 // otherwise. | 763 // otherwise. |
756 bool received_truncated_ack_; | 764 bool received_truncated_ack_; |
757 bool send_ack_in_response_to_packet_; | 765 bool send_ack_in_response_to_packet_; |
758 | 766 |
759 // Set to true if the udp packet headers have a new self or peer address. | 767 // Set to true if the udp packet headers have a new self or peer address. |
760 // This is checked later on validating a data or version negotiation packet. | 768 // This is checked later on validating a data or version negotiation packet. |
761 bool address_migrating_; | 769 bool address_migrating_; |
762 | 770 |
763 // An AckNotifier can register to be informed when ACKs have been received for | |
764 // all packets that a given block of data was sent in. The AckNotifierManager | |
765 // maintains the currently active notifiers. | |
766 AckNotifierManager ack_notifier_manager_; | |
767 | |
768 DISALLOW_COPY_AND_ASSIGN(QuicConnection); | 771 DISALLOW_COPY_AND_ASSIGN(QuicConnection); |
769 }; | 772 }; |
770 | 773 |
771 } // namespace net | 774 } // namespace net |
772 | 775 |
773 #endif // NET_QUIC_QUIC_CONNECTION_H_ | 776 #endif // NET_QUIC_QUIC_CONNECTION_H_ |
OLD | NEW |