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

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

Issue 13976007: Land Recent QUIC Changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated copyright notice Created 7 years, 8 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_dispatcher.h ('k') | net/tools/quic/quic_dispatcher_test.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_dispatcher.h" 5 #include "net/tools/quic/quic_dispatcher.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 16 matching lines...) Expand all
27 virtual int64 OnAlarm() { 27 virtual int64 OnAlarm() {
28 EpollAlarm::OnAlarm(); 28 EpollAlarm::OnAlarm();
29 dispatcher_->DeleteSessions(); 29 dispatcher_->DeleteSessions();
30 return 0; 30 return 0;
31 } 31 }
32 32
33 private: 33 private:
34 QuicDispatcher* dispatcher_; 34 QuicDispatcher* dispatcher_;
35 }; 35 };
36 36
37 QuicDispatcher::QuicDispatcher(int fd, EpollServer* epoll_server) 37 QuicDispatcher::QuicDispatcher(const QuicConfig& config,
38 : time_wait_list_manager_( 38 const QuicCryptoServerConfig& crypto_config,
39 int fd,
40 EpollServer* epoll_server)
41 : config_(config),
42 crypto_config_(crypto_config),
43 time_wait_list_manager_(
39 new QuicTimeWaitListManager(this, epoll_server)), 44 new QuicTimeWaitListManager(this, epoll_server)),
40 delete_sessions_alarm_(new DeleteSessionsAlarm(this)), 45 delete_sessions_alarm_(new DeleteSessionsAlarm(this)),
41 epoll_server_(epoll_server), 46 epoll_server_(epoll_server),
42 fd_(fd), 47 fd_(fd),
43 write_blocked_(false) { 48 write_blocked_(false) {
44 } 49 }
45 50
46 QuicDispatcher::~QuicDispatcher() { 51 QuicDispatcher::~QuicDispatcher() {
47 STLDeleteValues(&session_map_); 52 STLDeleteValues(&session_map_);
48 STLDeleteElements(&closed_session_list_); 53 STLDeleteElements(&closed_session_list_);
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 } 175 }
171 176
172 QuicSession* QuicDispatcher::CreateQuicSession( 177 QuicSession* QuicDispatcher::CreateQuicSession(
173 QuicGuid guid, 178 QuicGuid guid,
174 const IPEndPoint& client_address, 179 const IPEndPoint& client_address,
175 int fd, 180 int fd,
176 EpollServer* epoll_server) { 181 EpollServer* epoll_server) {
177 QuicConnectionHelperInterface* helper = 182 QuicConnectionHelperInterface* helper =
178 new QuicEpollConnectionHelper(this, epoll_server); 183 new QuicEpollConnectionHelper(this, epoll_server);
179 return new QuicServerSession( 184 return new QuicServerSession(
185 config_, crypto_config_,
180 new QuicConnection(guid, client_address, helper, true), this); 186 new QuicConnection(guid, client_address, helper, true), this);
181 } 187 }
182 188
183 } // namespace tools 189 } // namespace tools
184 } // namespace net 190 } // namespace net
185 191
186 192
OLDNEW
« no previous file with comments | « net/tools/quic/quic_dispatcher.h ('k') | net/tools/quic/quic_dispatcher_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698