| 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 #include "net/quic/quic_flow_controller.h" | 5 #include "net/quic/quic_flow_controller.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "net/quic/quic_connection.h" | 8 #include "net/quic/quic_connection.h" |
| 9 #include "net/quic/quic_flags.h" | 9 #include "net/quic/quic_flags.h" |
| 10 #include "net/quic/quic_protocol.h" | 10 #include "net/quic/quic_protocol.h" |
| 11 | 11 |
| 12 namespace net { | 12 namespace net { |
| 13 | 13 |
| 14 namespace { | |
| 15 const QuicByteCount kStreamReceiveWindowLimit = 16 * 1024 * 1024; // 16 MB | |
| 16 const QuicByteCount kSessionReceiveWindowLimit = 24 * 1024 * 1024; // 24 MB | |
| 17 } | |
| 18 | |
| 19 #define ENDPOINT \ | 14 #define ENDPOINT \ |
| 20 (perspective_ == Perspective::IS_SERVER ? "Server: " : "Client: ") | 15 (perspective_ == Perspective::IS_SERVER ? "Server: " : "Client: ") |
| 21 | 16 |
| 22 QuicFlowController::QuicFlowController(QuicConnection* connection, | 17 QuicFlowController::QuicFlowController(QuicConnection* connection, |
| 23 QuicStreamId id, | 18 QuicStreamId id, |
| 24 Perspective perspective, | 19 Perspective perspective, |
| 25 QuicStreamOffset send_window_offset, | 20 QuicStreamOffset send_window_offset, |
| 26 QuicStreamOffset receive_window_offset, | 21 QuicStreamOffset receive_window_offset, |
| 27 bool should_auto_tune_receive_window) | 22 bool should_auto_tune_receive_window) |
| 28 : connection_(connection), | 23 : connection_(connection), |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 if (receive_window_size_ != receive_window_offset_) { | 242 if (receive_window_size_ != receive_window_offset_) { |
| 248 LOG(DFATAL) << "receive_window_size_:" << receive_window_size_ | 243 LOG(DFATAL) << "receive_window_size_:" << receive_window_size_ |
| 249 << " != receive_window_offset:" << receive_window_offset_; | 244 << " != receive_window_offset:" << receive_window_offset_; |
| 250 return; | 245 return; |
| 251 } | 246 } |
| 252 receive_window_size_ = size; | 247 receive_window_size_ = size; |
| 253 receive_window_offset_ = size; | 248 receive_window_offset_ = size; |
| 254 } | 249 } |
| 255 | 250 |
| 256 } // namespace net | 251 } // namespace net |
| OLD | NEW |