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

Side by Side Diff: net/quic/congestion_control/receive_algorithm_interface.h

Issue 862133002: Update from https://crrev.com/312398 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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
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 pure virtual class for receive side congestion algorithm. 5 // The pure virtual class for receive side congestion algorithm.
6 6
7 #ifndef NET_QUIC_CONGESTION_CONTROL_RECEIVE_ALGORITHM_INTERFACE_H_ 7 #ifndef NET_QUIC_CONGESTION_CONTROL_RECEIVE_ALGORITHM_INTERFACE_H_
8 #define NET_QUIC_CONGESTION_CONTROL_RECEIVE_ALGORITHM_INTERFACE_H_ 8 #define NET_QUIC_CONGESTION_CONTROL_RECEIVE_ALGORITHM_INTERFACE_H_
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "net/base/net_export.h" 11 #include "net/base/net_export.h"
12 #include "net/quic/quic_clock.h" 12 #include "net/quic/quic_clock.h"
13 #include "net/quic/quic_protocol.h" 13 #include "net/quic/quic_protocol.h"
14 #include "net/quic/quic_time.h" 14 #include "net/quic/quic_time.h"
15 15
16 namespace net { 16 namespace net {
17 17
18 class NET_EXPORT_PRIVATE ReceiveAlgorithmInterface { 18 class NET_EXPORT_PRIVATE ReceiveAlgorithmInterface {
19 public: 19 public:
20 static ReceiveAlgorithmInterface* Create(CongestionFeedbackType type); 20 static ReceiveAlgorithmInterface* Create();
21 21
22 virtual ~ReceiveAlgorithmInterface() {} 22 virtual ~ReceiveAlgorithmInterface() {}
23 23
24 // Returns false if no QuicCongestionFeedbackFrame block is needed.
25 // Otherwise fills in feedback and return true.
26 virtual bool GenerateCongestionFeedback(
27 QuicCongestionFeedbackFrame* feedback) = 0;
28
29 // Should be called for each incoming packet. 24 // Should be called for each incoming packet.
30 // bytes: is the packet size in bytes including IP headers. 25 // bytes: is the packet size in bytes including IP headers.
31 // sequence_number: is the unique sequence number from the QUIC packet header. 26 // sequence_number: is the unique sequence number from the QUIC packet header.
32 // timestamp: is the sent timestamp from the QUIC packet header. 27 // timestamp: is the sent timestamp from the QUIC packet header.
33 virtual void RecordIncomingPacket(QuicByteCount bytes, 28 virtual void RecordIncomingPacket(QuicByteCount bytes,
34 QuicPacketSequenceNumber sequence_number, 29 QuicPacketSequenceNumber sequence_number,
35 QuicTime timestamp) = 0; 30 QuicTime timestamp) = 0;
36 }; 31 };
37 32
38 } // namespace net 33 } // namespace net
39 34
40 #endif // NET_QUIC_CONGESTION_CONTROL_RECEIVE_ALGORITHM_INTERFACE_H_ 35 #endif // NET_QUIC_CONGESTION_CONTROL_RECEIVE_ALGORITHM_INTERFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698