OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef NET_QUIC_CORE_QUIC_FLOW_CONTROLLER_H_ | 5 #ifndef NET_QUIC_CORE_QUIC_FLOW_CONTROLLER_H_ |
6 #define NET_QUIC_CORE_QUIC_FLOW_CONTROLLER_H_ | 6 #define NET_QUIC_CORE_QUIC_FLOW_CONTROLLER_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "net/base/net_export.h" | |
10 #include "net/quic/core/quic_packets.h" | 9 #include "net/quic/core/quic_packets.h" |
| 10 #include "net/quic/platform/api/quic_export.h" |
11 | 11 |
12 namespace net { | 12 namespace net { |
13 | 13 |
14 namespace test { | 14 namespace test { |
15 class QuicFlowControllerPeer; | 15 class QuicFlowControllerPeer; |
16 } // namespace test | 16 } // namespace test |
17 | 17 |
18 class QuicConnection; | 18 class QuicConnection; |
19 | 19 |
20 const QuicStreamId kConnectionLevelId = 0; | 20 const QuicStreamId kConnectionLevelId = 0; |
21 | 21 |
22 // QuicFlowController allows a QUIC stream or connection to perform flow | 22 // QuicFlowController allows a QUIC stream or connection to perform flow |
23 // control. The stream/connection owns a QuicFlowController which keeps track of | 23 // control. The stream/connection owns a QuicFlowController which keeps track of |
24 // bytes sent/received, can tell the owner if it is flow control blocked, and | 24 // bytes sent/received, can tell the owner if it is flow control blocked, and |
25 // can send WINDOW_UPDATE or BLOCKED frames when needed. | 25 // can send WINDOW_UPDATE or BLOCKED frames when needed. |
26 class NET_EXPORT_PRIVATE QuicFlowController { | 26 class QUIC_EXPORT_PRIVATE QuicFlowController { |
27 public: | 27 public: |
28 QuicFlowController(QuicConnection* connection, | 28 QuicFlowController(QuicConnection* connection, |
29 QuicStreamId id, | 29 QuicStreamId id, |
30 Perspective perspective, | 30 Perspective perspective, |
31 QuicStreamOffset send_window_offset, | 31 QuicStreamOffset send_window_offset, |
32 QuicStreamOffset receive_window_offset, | 32 QuicStreamOffset receive_window_offset, |
33 bool should_auto_tune_receive_window); | 33 bool should_auto_tune_receive_window); |
34 | 34 |
35 ~QuicFlowController() {} | 35 ~QuicFlowController() {} |
36 | 36 |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 // Keep time of the last time a window update was sent. We use this | 162 // Keep time of the last time a window update was sent. We use this |
163 // as part of the receive window auto tuning. | 163 // as part of the receive window auto tuning. |
164 QuicTime prev_window_update_time_; | 164 QuicTime prev_window_update_time_; |
165 | 165 |
166 DISALLOW_COPY_AND_ASSIGN(QuicFlowController); | 166 DISALLOW_COPY_AND_ASSIGN(QuicFlowController); |
167 }; | 167 }; |
168 | 168 |
169 } // namespace net | 169 } // namespace net |
170 | 170 |
171 #endif // NET_QUIC_CORE_QUIC_FLOW_CONTROLLER_H_ | 171 #endif // NET_QUIC_CORE_QUIC_FLOW_CONTROLLER_H_ |
OLD | NEW |