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

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

Issue 612323013: QUIC - (no behavior change) s/NULL/nullptr/g in .../quic/... (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « net/tools/quic/quic_in_memory_cache_test.cc ('k') | net/tools/quic/quic_server_session.cc » ('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 (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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 void QuicServer::OnEvent(int fd, EpollEvent* event) { 186 void QuicServer::OnEvent(int fd, EpollEvent* event) {
187 DCHECK_EQ(fd, fd_); 187 DCHECK_EQ(fd, fd_);
188 event->out_ready_mask = 0; 188 event->out_ready_mask = 0;
189 189
190 if (event->in_events & EPOLLIN) { 190 if (event->in_events & EPOLLIN) {
191 DVLOG(1) << "EPOLLIN"; 191 DVLOG(1) << "EPOLLIN";
192 bool read = true; 192 bool read = true;
193 while (read) { 193 while (read) {
194 read = ReadAndDispatchSinglePacket( 194 read = ReadAndDispatchSinglePacket(
195 fd_, port_, dispatcher_.get(), 195 fd_, port_, dispatcher_.get(),
196 overflow_supported_ ? &packets_dropped_ : NULL); 196 overflow_supported_ ? &packets_dropped_ : nullptr);
197 } 197 }
198 } 198 }
199 if (event->in_events & EPOLLOUT) { 199 if (event->in_events & EPOLLOUT) {
200 dispatcher_->OnCanWrite(); 200 dispatcher_->OnCanWrite();
201 if (dispatcher_->HasPendingWrites()) { 201 if (dispatcher_->HasPendingWrites()) {
202 event->out_ready_mask |= EPOLLOUT; 202 event->out_ready_mask |= EPOLLOUT;
203 } 203 }
204 } 204 }
205 if (event->in_events & EPOLLERR) { 205 if (event->in_events & EPOLLERR) {
206 } 206 }
(...skipping 22 matching lines...) Expand all
229 QuicEncryptedPacket packet(buf, bytes_read, false); 229 QuicEncryptedPacket packet(buf, bytes_read, false);
230 230
231 IPEndPoint server_address(server_ip, port); 231 IPEndPoint server_address(server_ip, port);
232 processor->ProcessPacket(server_address, client_address, packet); 232 processor->ProcessPacket(server_address, client_address, packet);
233 233
234 return true; 234 return true;
235 } 235 }
236 236
237 } // namespace tools 237 } // namespace tools
238 } // namespace net 238 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_in_memory_cache_test.cc ('k') | net/tools/quic/quic_server_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698