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

Side by Side Diff: net/quic/congestion_control/tcp_receiver.cc

Issue 125403006: Various QUIC cleanups to sync with internal code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comments Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_sender_test.cc ('k') | net/quic/quic_bandwidth.h » ('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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "net/quic/congestion_control/tcp_receiver.h" 6 #include "net/quic/congestion_control/tcp_receiver.h"
7 7
8 namespace net { 8 namespace net {
9 9
10 // Originally 64K bytes, but increased it to 256K to support higher bitrates.
10 // static 11 // static
11 // Originally 64K bytes for TCP, setting it to 256K to support higher bitrates.
12 const QuicByteCount TcpReceiver::kReceiveWindowTCP = 256000; 12 const QuicByteCount TcpReceiver::kReceiveWindowTCP = 256000;
13 13
14 TcpReceiver::TcpReceiver() 14 TcpReceiver::TcpReceiver()
15 : accumulated_number_of_recoverd_lost_packets_(0), 15 : accumulated_number_of_recoverd_lost_packets_(0),
16 receive_window_(kReceiveWindowTCP) { 16 receive_window_(kReceiveWindowTCP) {
17 } 17 }
18 18
19 bool TcpReceiver::GenerateCongestionFeedback( 19 bool TcpReceiver::GenerateCongestionFeedback(
20 QuicCongestionFeedbackFrame* feedback) { 20 QuicCongestionFeedbackFrame* feedback) {
21 feedback->type = kTCP; 21 feedback->type = kTCP;
22 feedback->tcp.accumulated_number_of_lost_packets = 22 feedback->tcp.accumulated_number_of_lost_packets =
23 accumulated_number_of_recoverd_lost_packets_; 23 accumulated_number_of_recoverd_lost_packets_;
24 feedback->tcp.receive_window = receive_window_; 24 feedback->tcp.receive_window = receive_window_;
25 return true; 25 return true;
26 } 26 }
27 27
28 void TcpReceiver::RecordIncomingPacket(QuicByteCount bytes, 28 void TcpReceiver::RecordIncomingPacket(QuicByteCount bytes,
29 QuicPacketSequenceNumber sequence_number, 29 QuicPacketSequenceNumber sequence_number,
30 QuicTime timestamp, 30 QuicTime timestamp,
31 bool revived) { 31 bool revived) {
32 if (revived) { 32 if (revived) {
33 ++accumulated_number_of_recoverd_lost_packets_; 33 ++accumulated_number_of_recoverd_lost_packets_;
34 } 34 }
35 } 35 }
36 36
37 } // namespace net 37 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/congestion_control/tcp_cubic_sender_test.cc ('k') | net/quic/quic_bandwidth.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698