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

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

Issue 14816006: Land Recent QUIC changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added missing NET_PRIVATE_EXPORT to QuicWallTime Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « net/tools/quic/quic_epoll_clock_test.cc ('k') | net/tools/quic/quic_spdy_client_stream.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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // Initialize the in memory cache now. 44 // Initialize the in memory cache now.
45 QuicInMemoryCache::GetInstance(); 45 QuicInMemoryCache::GetInstance();
46 46
47 // Use hardcoded crypto parameters for now. 47 // Use hardcoded crypto parameters for now.
48 config_.SetDefaults(); 48 config_.SetDefaults();
49 CryptoHandshakeMessage extra_tags; 49 CryptoHandshakeMessage extra_tags;
50 config_.ToHandshakeMessage(&extra_tags); 50 config_.ToHandshakeMessage(&extra_tags);
51 QuicEpollClock clock(&epoll_server_); 51 QuicEpollClock clock(&epoll_server_);
52 52
53 scoped_ptr<CryptoHandshakeMessage> scfg( 53 scoped_ptr<CryptoHandshakeMessage> scfg(
54 crypto_config_.AddDefaultConfig(QuicRandom::GetInstance(), &clock, 54 crypto_config_.AddDefaultConfig(
55 extra_tags)); 55 QuicRandom::GetInstance(), &clock, extra_tags,
56 QuicCryptoServerConfig::kDefaultExpiry));
56 // If we were using the same config in many servers then we would have to 57 // If we were using the same config in many servers then we would have to
57 // parse a QuicConfig from config_tags here. 58 // parse a QuicConfig from config_tags here.
58 if (!config_.SetFromHandshakeMessage(*scfg)) { 59 if (!config_.SetFromHandshakeMessage(*scfg)) {
59 CHECK(false) << "Crypto config could not be parsed by QuicConfig."; 60 CHECK(false) << "Crypto config could not be parsed by QuicConfig.";
60 } 61 }
61 } 62 }
62 63
63 QuicServer::~QuicServer() { 64 QuicServer::~QuicServer() {
64 } 65 }
65 66
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 } 199 }
199 200
200 IPEndPoint server_address(server_ip, port); 201 IPEndPoint server_address(server_ip, port);
201 dispatcher->ProcessPacket(server_address, client_address, guid, packet); 202 dispatcher->ProcessPacket(server_address, client_address, guid, packet);
202 203
203 return true; 204 return true;
204 } 205 }
205 206
206 } // namespace tools 207 } // namespace tools
207 } // namespace net 208 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_epoll_clock_test.cc ('k') | net/tools/quic/quic_spdy_client_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698