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

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

Issue 2403193003: Landing Recent QUIC changes until 9:41 AM, Oct 10, 2016 UTC-7 (Closed)
Patch Set: git cl format Created 4 years, 2 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
OLDNEW
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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 DVLOG(1) << "EPOLLIN"; 181 DVLOG(1) << "EPOLLIN";
182 182
183 if (FLAGS_quic_limit_num_new_sessions_per_epoll_loop && 183 if (FLAGS_quic_limit_num_new_sessions_per_epoll_loop &&
184 FLAGS_quic_buffer_packet_till_chlo) { 184 FLAGS_quic_buffer_packet_till_chlo) {
185 dispatcher_->ProcessBufferedChlos(kNumSessionsToCreatePerSocketEvent); 185 dispatcher_->ProcessBufferedChlos(kNumSessionsToCreatePerSocketEvent);
186 } 186 }
187 187
188 bool more_to_read = true; 188 bool more_to_read = true;
189 while (more_to_read) { 189 while (more_to_read) {
190 more_to_read = packet_reader_->ReadAndDispatchPackets( 190 more_to_read = packet_reader_->ReadAndDispatchPackets(
191 fd_, port_, false /* potentially_small_mtu */, 191 fd_, port_, QuicEpollClock(&epoll_server_), dispatcher_.get(),
192 QuicEpollClock(&epoll_server_), dispatcher_.get(),
193 overflow_supported_ ? &packets_dropped_ : nullptr); 192 overflow_supported_ ? &packets_dropped_ : nullptr);
194 } 193 }
195 194
196 if (FLAGS_quic_limit_num_new_sessions_per_epoll_loop && 195 if (FLAGS_quic_limit_num_new_sessions_per_epoll_loop &&
197 FLAGS_quic_buffer_packet_till_chlo && dispatcher_->HasChlosBuffered()) { 196 FLAGS_quic_buffer_packet_till_chlo && dispatcher_->HasChlosBuffered()) {
198 // Register EPOLLIN event to consume buffered CHLO(s). 197 // Register EPOLLIN event to consume buffered CHLO(s).
199 event->out_ready_mask |= EPOLLIN; 198 event->out_ready_mask |= EPOLLIN;
200 } 199 }
201 } 200 }
202 if (event->in_events & EPOLLOUT) { 201 if (event->in_events & EPOLLOUT) {
203 dispatcher_->OnCanWrite(); 202 dispatcher_->OnCanWrite();
204 if (dispatcher_->HasPendingWrites()) { 203 if (dispatcher_->HasPendingWrites()) {
205 event->out_ready_mask |= EPOLLOUT; 204 event->out_ready_mask |= EPOLLOUT;
206 } 205 }
207 } 206 }
208 if (event->in_events & EPOLLERR) { 207 if (event->in_events & EPOLLERR) {
209 } 208 }
210 } 209 }
211 210
212 } // namespace net 211 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_packet_reader.cc ('k') | net/tools/quic/quic_time_wait_list_manager_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698