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

Side by Side Diff: net/quic/quic_server.cc

Issue 851503003: Update from https://crrev.com/311076 (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
« no previous file with comments | « net/quic/quic_sent_packet_manager_test.cc ('k') | net/quic/quic_session.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_server.h" 5 #include "net/quic/quic_server.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "net/base/ip_endpoint.h" 9 #include "net/base/ip_endpoint.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 void QuicServer::Initialize() { 49 void QuicServer::Initialize() {
50 #if MMSG_MORE 50 #if MMSG_MORE
51 use_recvmmsg_ = true; 51 use_recvmmsg_ = true;
52 #endif 52 #endif
53 53
54 // If an initial flow control window has not explicitly been set, then use a 54 // If an initial flow control window has not explicitly been set, then use a
55 // sensible value for a server: 1 MB for session, 64 KB for each stream. 55 // sensible value for a server: 1 MB for session, 64 KB for each stream.
56 const uint32 kInitialSessionFlowControlWindow = 1 * 1024 * 1024; // 1 MB 56 const uint32 kInitialSessionFlowControlWindow = 1 * 1024 * 1024; // 1 MB
57 const uint32 kInitialStreamFlowControlWindow = 64 * 1024; // 64 KB 57 const uint32 kInitialStreamFlowControlWindow = 64 * 1024; // 64 KB
58 if (config_.GetInitialFlowControlWindowToSend() ==
59 kMinimumFlowControlSendWindow) {
60 config_.SetInitialFlowControlWindowToSend(kInitialSessionFlowControlWindow);
61 }
62 if (config_.GetInitialStreamFlowControlWindowToSend() == 58 if (config_.GetInitialStreamFlowControlWindowToSend() ==
63 kMinimumFlowControlSendWindow) { 59 kMinimumFlowControlSendWindow) {
64 config_.SetInitialStreamFlowControlWindowToSend( 60 config_.SetInitialStreamFlowControlWindowToSend(
65 kInitialStreamFlowControlWindow); 61 kInitialStreamFlowControlWindow);
66 } 62 }
67 if (config_.GetInitialSessionFlowControlWindowToSend() == 63 if (config_.GetInitialSessionFlowControlWindowToSend() ==
68 kMinimumFlowControlSendWindow) { 64 kMinimumFlowControlSendWindow) {
69 config_.SetInitialSessionFlowControlWindowToSend( 65 config_.SetInitialSessionFlowControlWindowToSend(
70 kInitialSessionFlowControlWindow); 66 kInitialSessionFlowControlWindow);
71 } 67 }
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 return; 183 return;
188 } 184 }
189 185
190 QuicEncryptedPacket packet(read_buffer_->data(), result, false); 186 QuicEncryptedPacket packet(read_buffer_->data(), result, false);
191 dispatcher_->ProcessPacket(server_address_, client_address_, packet); 187 dispatcher_->ProcessPacket(server_address_, client_address_, packet);
192 188
193 StartReading(); 189 StartReading();
194 } 190 }
195 191
196 } // namespace net 192 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_sent_packet_manager_test.cc ('k') | net/quic/quic_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698