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