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 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
496 bool HasQueuedData() const; | 496 bool HasQueuedData() const; |
497 | 497 |
498 // Sets the overall and idle state connection timeouts. | 498 // Sets the overall and idle state connection timeouts. |
499 void SetNetworkTimeouts(QuicTime::Delta overall_timeout, | 499 void SetNetworkTimeouts(QuicTime::Delta overall_timeout, |
500 QuicTime::Delta idle_timeout); | 500 QuicTime::Delta idle_timeout); |
501 | 501 |
502 // If the connection has timed out, this will close the connection. | 502 // If the connection has timed out, this will close the connection. |
503 // Otherwise, it will reschedule the timeout alarm. | 503 // Otherwise, it will reschedule the timeout alarm. |
504 void CheckForTimeout(); | 504 void CheckForTimeout(); |
505 | 505 |
506 // Sends a ping, and resets the ping alarm. | 506 // Sends a ping, and resets the ping alarm. If |force| is false, |
507 void SendPing(); | 507 // only sends a ping if the retransmission alarm is not running. |
| 508 void SendPing(bool force); |
508 | 509 |
509 // Sets up a packet with an QuicAckFrame and sends it out. | 510 // Sets up a packet with an QuicAckFrame and sends it out. |
510 void SendAck(); | 511 void SendAck(); |
511 | 512 |
512 // Called when an RTO fires. Resets the retransmission alarm if there are | 513 // Called when an RTO fires. Resets the retransmission alarm if there are |
513 // remaining unacked packets. | 514 // remaining unacked packets. |
514 void OnRetransmissionTimeout(); | 515 void OnRetransmissionTimeout(); |
515 | 516 |
516 // Called when a data packet is sent. Starts an alarm if the data sent in | 517 // Called when a data packet is sent. Starts an alarm if the data sent in |
517 // |packet_number| was FEC protected. | 518 // |packet_number| was FEC protected. |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
986 | 987 |
987 // Whether a GoAway has been received. | 988 // Whether a GoAway has been received. |
988 bool goaway_received_; | 989 bool goaway_received_; |
989 | 990 |
990 DISALLOW_COPY_AND_ASSIGN(QuicConnection); | 991 DISALLOW_COPY_AND_ASSIGN(QuicConnection); |
991 }; | 992 }; |
992 | 993 |
993 } // namespace net | 994 } // namespace net |
994 | 995 |
995 #endif // NET_QUIC_QUIC_CONNECTION_H_ | 996 #endif // NET_QUIC_QUIC_CONNECTION_H_ |
OLD | NEW |