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

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

Issue 1405843003: relnote: n/a (standalone quic_server binary). Cleanup: Use C++11 delegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Reduce_size_of_TransmissionInfo_104242241
Patch Set: Created 5 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 | « no previous file | no next file » | 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 30 matching lines...) Expand all
41 // construction to seed the cache. Cache directory can be 41 // construction to seed the cache. Cache directory can be
42 // generated using `wget -p --save-headers <url>` 42 // generated using `wget -p --save-headers <url>`
43 std::string FLAGS_quic_in_memory_cache_dir = ""; 43 std::string FLAGS_quic_in_memory_cache_dir = "";
44 44
45 const int kEpollFlags = EPOLLIN | EPOLLOUT | EPOLLET; 45 const int kEpollFlags = EPOLLIN | EPOLLOUT | EPOLLET;
46 const char kSourceAddressTokenSecret[] = "secret"; 46 const char kSourceAddressTokenSecret[] = "secret";
47 47
48 } // namespace 48 } // namespace
49 49
50 QuicServer::QuicServer(ProofSource* proof_source) 50 QuicServer::QuicServer(ProofSource* proof_source)
51 : port_(0), 51 : QuicServer(proof_source, QuicConfig(), QuicSupportedVersions()) {}
52 fd_(-1),
53 packets_dropped_(0),
54 overflow_supported_(false),
55 use_recvmmsg_(false),
56 crypto_config_(kSourceAddressTokenSecret,
57 QuicRandom::GetInstance(),
58 proof_source),
59 supported_versions_(QuicSupportedVersions()),
60 packet_reader_(new QuicPacketReader()) {
61 Initialize();
62 }
63 52
64 QuicServer::QuicServer(ProofSource* proof_source, 53 QuicServer::QuicServer(ProofSource* proof_source,
65 const QuicConfig& config, 54 const QuicConfig& config,
66 const QuicVersionVector& supported_versions) 55 const QuicVersionVector& supported_versions)
67 : port_(0), 56 : port_(0),
68 fd_(-1), 57 fd_(-1),
69 packets_dropped_(0), 58 packets_dropped_(0),
70 overflow_supported_(false), 59 overflow_supported_(false),
71 use_recvmmsg_(false), 60 use_recvmmsg_(false),
72 config_(config), 61 config_(config),
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 if (dispatcher_->HasPendingWrites()) { 227 if (dispatcher_->HasPendingWrites()) {
239 event->out_ready_mask |= EPOLLOUT; 228 event->out_ready_mask |= EPOLLOUT;
240 } 229 }
241 } 230 }
242 if (event->in_events & EPOLLERR) { 231 if (event->in_events & EPOLLERR) {
243 } 232 }
244 } 233 }
245 234
246 } // namespace tools 235 } // namespace tools
247 } // namespace net 236 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698