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

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

Issue 1665303003: Adds plumbing for QUIC early connection migration. No behavior change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@home
Patch Set: Created 4 years, 10 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_connection.h ('k') | net/quic/quic_connection_test.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 #include "net/quic/quic_connection.h" 5 #include "net/quic/quic_connection.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 #include <sys/types.h> 8 #include <sys/types.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1785 matching lines...) Expand 10 before | Expand all | Expand 10 after
1796 QuicTime::Delta rtt = sent_packet_manager_.GetRttStats()->smoothed_rtt(); 1796 QuicTime::Delta rtt = sent_packet_manager_.GetRttStats()->smoothed_rtt();
1797 if (rtt.IsZero()) { 1797 if (rtt.IsZero()) {
1798 rtt = QuicTime::Delta::FromMicroseconds( 1798 rtt = QuicTime::Delta::FromMicroseconds(
1799 sent_packet_manager_.GetRttStats()->initial_rtt_us()); 1799 sent_packet_manager_.GetRttStats()->initial_rtt_us());
1800 } 1800 }
1801 if (debug_visitor_) 1801 if (debug_visitor_)
1802 debug_visitor_->OnRttChanged(rtt); 1802 debug_visitor_->OnRttChanged(rtt);
1803 packet_generator_.OnRttChange(rtt); 1803 packet_generator_.OnRttChange(rtt);
1804 } 1804 }
1805 1805
1806 void QuicConnection::OnPathDegrading() {
1807 visitor_->OnPathDegrading();
1808 }
1809
1806 void QuicConnection::OnHandshakeComplete() { 1810 void QuicConnection::OnHandshakeComplete() {
1807 sent_packet_manager_.SetHandshakeConfirmed(); 1811 sent_packet_manager_.SetHandshakeConfirmed();
1808 // The client should immediately ack the SHLO to confirm the handshake is 1812 // The client should immediately ack the SHLO to confirm the handshake is
1809 // complete with the server. 1813 // complete with the server.
1810 if (perspective_ == Perspective::IS_CLIENT && !ack_queued_ && 1814 if (perspective_ == Perspective::IS_CLIENT && !ack_queued_ &&
1811 ack_frame_updated()) { 1815 ack_frame_updated()) {
1812 ack_alarm_->Cancel(); 1816 ack_alarm_->Cancel();
1813 ack_alarm_->Set(clock_->ApproximateNow()); 1817 ack_alarm_->Set(clock_->ApproximateNow());
1814 } 1818 }
1815 } 1819 }
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after
2536 void QuicConnection::OnPathClosed(QuicPathId path_id) { 2540 void QuicConnection::OnPathClosed(QuicPathId path_id) {
2537 // Stop receiving packets on this path. 2541 // Stop receiving packets on this path.
2538 framer_.OnPathClosed(path_id); 2542 framer_.OnPathClosed(path_id);
2539 } 2543 }
2540 2544
2541 bool QuicConnection::ack_frame_updated() const { 2545 bool QuicConnection::ack_frame_updated() const {
2542 return received_packet_manager_.ack_frame_updated(); 2546 return received_packet_manager_.ack_frame_updated();
2543 } 2547 }
2544 2548
2545 } // namespace net 2549 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_connection.h ('k') | net/quic/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698