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

Unified Diff: net/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/quic/quic_sent_packet_manager_test.cc ('k') | net/quic/quic_server_session.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_server.cc
diff --git a/net/quic/quic_server.cc b/net/quic/quic_server.cc
index 7b0f45400ec85a67c681577894892805556e01d1..e8262a8f924c21d102746bca5b4bb09a9307c60f 100644
--- a/net/quic/quic_server.cc
+++ b/net/quic/quic_server.cc
@@ -47,6 +47,29 @@ QuicServer::QuicServer(const QuicConfig& config,
}
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);
+ }
+
// Initialize the in memory cache now.
QuicInMemoryCache::GetInstance();
« no previous file with comments | « net/quic/quic_sent_packet_manager_test.cc ('k') | net/quic/quic_server_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698