Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(201)

Side by Side Diff: net/quic/quic_connection.h

Issue 605733006: Land Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert Patch Set 3 Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/quic_config_test.cc ('k') | net/quic/quic_connection.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 432
433 // Sets (or resets) the idle state connection timeout. Also, checks and times 433 // Sets (or resets) the idle state connection timeout. Also, checks and times
434 // out the connection if network timer has expired for |timeout|. 434 // out the connection if network timer has expired for |timeout|.
435 void SetIdleNetworkTimeout(QuicTime::Delta timeout); 435 void SetIdleNetworkTimeout(QuicTime::Delta timeout);
436 // Sets (or resets) the total time delta the connection can be alive for. 436 // Sets (or resets) the total time delta the connection can be alive for.
437 // Also, checks and times out the connection if timer has expired for 437 // Also, checks and times out the connection if timer has expired for
438 // |timeout|. Used to limit the time a connection can be alive before crypto 438 // |timeout|. Used to limit the time a connection can be alive before crypto
439 // handshake finishes. 439 // handshake finishes.
440 void SetOverallConnectionTimeout(QuicTime::Delta timeout); 440 void SetOverallConnectionTimeout(QuicTime::Delta timeout);
441 441
442 // If the connection has timed out, this will close the connection and return 442 // If the connection has timed out, this will close the connection.
443 // true. Otherwise, it will return false and will reset the timeout alarm. 443 // Otherwise, it will reschedule the timeout alarm.
444 bool CheckForTimeout(); 444 void CheckForTimeout();
445 445
446 // Sends a ping, and resets the ping alarm. 446 // Sends a ping, and resets the ping alarm.
447 void SendPing(); 447 void SendPing();
448 448
449 // Sets up a packet with an QuicAckFrame and sends it out. 449 // Sets up a packet with an QuicAckFrame and sends it out.
450 void SendAck(); 450 void SendAck();
451 451
452 // Called when an RTO fires. Resets the retransmission alarm if there are 452 // Called when an RTO fires. Resets the retransmission alarm if there are
453 // remaining unacked packets. 453 // remaining unacked packets.
454 void OnRetransmissionTimeout(); 454 void OnRetransmissionTimeout();
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 // to be sent if there are no outstanding packets. 644 // to be sent if there are no outstanding packets.
645 QuicPacketSequenceNumber GetLeastUnacked() const; 645 QuicPacketSequenceNumber GetLeastUnacked() const;
646 646
647 // Get the FEC group associate with the last processed packet or NULL, if the 647 // Get the FEC group associate with the last processed packet or NULL, if the
648 // group has already been deleted. 648 // group has already been deleted.
649 QuicFecGroup* GetFecGroup(); 649 QuicFecGroup* GetFecGroup();
650 650
651 // Closes any FEC groups protecting packets before |sequence_number|. 651 // Closes any FEC groups protecting packets before |sequence_number|.
652 void CloseFecGroupsBefore(QuicPacketSequenceNumber sequence_number); 652 void CloseFecGroupsBefore(QuicPacketSequenceNumber sequence_number);
653 653
654 // Sets the timeout alarm to the appropriate value, if any.
655 void SetTimeoutAlarm();
656
654 // Sets the ping alarm to the appropriate value, if any. 657 // Sets the ping alarm to the appropriate value, if any.
655 void SetPingAlarm(); 658 void SetPingAlarm();
656 659
657 // On arrival of a new packet, checks to see if the socket addresses have 660 // On arrival of a new packet, checks to see if the socket addresses have
658 // changed since the last packet we saw on this connection. 661 // changed since the last packet we saw on this connection.
659 void CheckForAddressMigration(const IPEndPoint& self_address, 662 void CheckForAddressMigration(const IPEndPoint& self_address,
660 const IPEndPoint& peer_address); 663 const IPEndPoint& peer_address);
661 664
662 HasRetransmittableData IsRetransmittable(const QueuedPacket& packet); 665 HasRetransmittableData IsRetransmittable(const QueuedPacket& packet);
663 bool IsConnectionClose(QueuedPacket packet); 666 bool IsConnectionClose(QueuedPacket packet);
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 // If non-empty this contains the set of versions received in a 809 // If non-empty this contains the set of versions received in a
807 // version negotiation packet. 810 // version negotiation packet.
808 QuicVersionVector server_supported_versions_; 811 QuicVersionVector server_supported_versions_;
809 812
810 DISALLOW_COPY_AND_ASSIGN(QuicConnection); 813 DISALLOW_COPY_AND_ASSIGN(QuicConnection);
811 }; 814 };
812 815
813 } // namespace net 816 } // namespace net
814 817
815 #endif // NET_QUIC_QUIC_CONNECTION_H_ 818 #endif // NET_QUIC_QUIC_CONNECTION_H_
OLDNEW
« no previous file with comments | « net/quic/quic_config_test.cc ('k') | net/quic/quic_connection.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698