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

Unified Diff: net/tools/quic/quic_server.cc

Issue 839143002: Roll Chrome into Mojo. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/tools/quic/quic_dispatcher.cc ('k') | net/tools/quic/quic_server_session.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_server.cc
diff --git a/net/tools/quic/quic_server.cc b/net/tools/quic/quic_server.cc
index fd24059d148f7940a31c2ba0c6a362ebc495d842..779f62c4565ec8f8441a2811f4adf3486a652ead 100644
--- a/net/tools/quic/quic_server.cc
+++ b/net/tools/quic/quic_server.cc
@@ -67,6 +67,26 @@ void QuicServer::Initialize() {
#if MMSG_MORE
use_recvmmsg_ = true;
#endif
+
+ // If an initial flow control window has not explicitly been set, then use a
+ // sensible value for a server: 1 MB for session, 64 KB for each stream.
+ const uint32 kInitialSessionFlowControlWindow = 1 * 1024 * 1024; // 1 MB
+ const uint32 kInitialStreamFlowControlWindow = 64 * 1024; // 64 KB
+ if (config_.GetInitialFlowControlWindowToSend() ==
+ kMinimumFlowControlSendWindow) {
+ config_.SetInitialFlowControlWindowToSend(kInitialSessionFlowControlWindow);
+ }
+ if (config_.GetInitialStreamFlowControlWindowToSend() ==
+ kMinimumFlowControlSendWindow) {
+ config_.SetInitialStreamFlowControlWindowToSend(
+ kInitialStreamFlowControlWindow);
+ }
+ if (config_.GetInitialSessionFlowControlWindowToSend() ==
+ kMinimumFlowControlSendWindow) {
+ config_.SetInitialSessionFlowControlWindowToSend(
+ kInitialSessionFlowControlWindow);
+ }
+
epoll_server_.set_timeout_in_us(50 * 1000);
// Initialize the in memory cache now.
QuicInMemoryCache::GetInstance();
« no previous file with comments | « net/tools/quic/quic_dispatcher.cc ('k') | net/tools/quic/quic_server_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698