| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/tools/quic/quic_server.h" | 5 #include "net/tools/quic/quic_server.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 #include <features.h> | 8 #include <features.h> |
| 9 #include <netinet/in.h> | 9 #include <netinet/in.h> |
| 10 #include <string.h> | 10 #include <string.h> |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 Initialize(); | 67 Initialize(); |
| 68 } | 68 } |
| 69 | 69 |
| 70 void QuicServer::Initialize() { | 70 void QuicServer::Initialize() { |
| 71 #if MMSG_MORE | 71 #if MMSG_MORE |
| 72 use_recvmmsg_ = true; | 72 use_recvmmsg_ = true; |
| 73 #endif | 73 #endif |
| 74 | 74 |
| 75 // If an initial flow control window has not explicitly been set, then use a | 75 // If an initial flow control window has not explicitly been set, then use a |
| 76 // sensible value for a server: 1 MB for session, 64 KB for each stream. | 76 // sensible value for a server: 1 MB for session, 64 KB for each stream. |
| 77 const uint32 kInitialSessionFlowControlWindow = 1 * 1024 * 1024; // 1 MB | 77 const uint32_t kInitialSessionFlowControlWindow = 1 * 1024 * 1024; // 1 MB |
| 78 const uint32 kInitialStreamFlowControlWindow = 64 * 1024; // 64 KB | 78 const uint32_t kInitialStreamFlowControlWindow = 64 * 1024; // 64 KB |
| 79 if (config_.GetInitialStreamFlowControlWindowToSend() == | 79 if (config_.GetInitialStreamFlowControlWindowToSend() == |
| 80 kMinimumFlowControlSendWindow) { | 80 kMinimumFlowControlSendWindow) { |
| 81 config_.SetInitialStreamFlowControlWindowToSend( | 81 config_.SetInitialStreamFlowControlWindowToSend( |
| 82 kInitialStreamFlowControlWindow); | 82 kInitialStreamFlowControlWindow); |
| 83 } | 83 } |
| 84 if (config_.GetInitialSessionFlowControlWindowToSend() == | 84 if (config_.GetInitialSessionFlowControlWindowToSend() == |
| 85 kMinimumFlowControlSendWindow) { | 85 kMinimumFlowControlSendWindow) { |
| 86 config_.SetInitialSessionFlowControlWindowToSend( | 86 config_.SetInitialSessionFlowControlWindowToSend( |
| 87 kInitialSessionFlowControlWindow); | 87 kInitialSessionFlowControlWindow); |
| 88 } | 88 } |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 if (dispatcher_->HasPendingWrites()) { | 221 if (dispatcher_->HasPendingWrites()) { |
| 222 event->out_ready_mask |= EPOLLOUT; | 222 event->out_ready_mask |= EPOLLOUT; |
| 223 } | 223 } |
| 224 } | 224 } |
| 225 if (event->in_events & EPOLLERR) { | 225 if (event->in_events & EPOLLERR) { |
| 226 } | 226 } |
| 227 } | 227 } |
| 228 | 228 |
| 229 } // namespace tools | 229 } // namespace tools |
| 230 } // namespace net | 230 } // namespace net |
| OLD | NEW |