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

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

Issue 2322233004: Landing Recent QUIC changes until Sun Sep 4 03:41:00 (Closed)
Patch Set: Remove simulation files from the build. Created 4 years, 3 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_simple_dispatcher.cc ('k') | net/tools/quic/quic_simple_server_session.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_simple_server.h" 5 #include "net/tools/quic/quic_simple_server.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 8
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 return rc; 119 return rc;
120 } 120 }
121 121
122 DVLOG(1) << "Listening on " << server_address_.ToString(); 122 DVLOG(1) << "Listening on " << server_address_.ToString();
123 123
124 socket_.swap(socket); 124 socket_.swap(socket);
125 125
126 dispatcher_.reset(new QuicSimpleDispatcher( 126 dispatcher_.reset(new QuicSimpleDispatcher(
127 config_, &crypto_config_, &version_manager_, 127 config_, &crypto_config_, &version_manager_,
128 std::unique_ptr<QuicConnectionHelperInterface>(helper_), 128 std::unique_ptr<QuicConnectionHelperInterface>(helper_),
129 std::unique_ptr<QuicServerSessionBase::Helper>( 129 std::unique_ptr<QuicCryptoServerStream::Helper>(
130 new QuicSimpleServerSessionHelper(QuicRandom::GetInstance())), 130 new QuicSimpleServerSessionHelper(QuicRandom::GetInstance())),
131 std::unique_ptr<QuicAlarmFactory>(alarm_factory_))); 131 std::unique_ptr<QuicAlarmFactory>(alarm_factory_)));
132 QuicSimpleServerPacketWriter* writer = 132 QuicSimpleServerPacketWriter* writer =
133 new QuicSimpleServerPacketWriter(socket_.get(), dispatcher_.get()); 133 new QuicSimpleServerPacketWriter(socket_.get(), dispatcher_.get());
134 dispatcher_->InitializeWithWriter(writer); 134 dispatcher_->InitializeWithWriter(writer);
135 135
136 StartReading(); 136 StartReading();
137 137
138 return OK; 138 return OK;
139 } 139 }
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 } 197 }
198 198
199 QuicReceivedPacket packet(read_buffer_->data(), result, 199 QuicReceivedPacket packet(read_buffer_->data(), result,
200 helper_->GetClock()->Now(), false); 200 helper_->GetClock()->Now(), false);
201 dispatcher_->ProcessPacket(server_address_, client_address_, packet); 201 dispatcher_->ProcessPacket(server_address_, client_address_, packet);
202 202
203 StartReading(); 203 StartReading();
204 } 204 }
205 205
206 } // namespace net 206 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_simple_dispatcher.cc ('k') | net/tools/quic/quic_simple_server_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698