OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/test_tools/server_thread.h" | 5 #include "net/tools/quic/test_tools/server_thread.h" |
6 | 6 |
7 namespace net { | 7 namespace net { |
8 namespace tools { | 8 namespace tools { |
9 namespace test { | 9 namespace test { |
10 | 10 |
11 ServerThread::ServerThread(IPEndPoint address, | 11 ServerThread::ServerThread(IPEndPoint address, |
12 const QuicConfig& config, | 12 const QuicConfig& config, |
| 13 const QuicVersionVector& supported_versions, |
13 bool strike_register_no_startup_period) | 14 bool strike_register_no_startup_period) |
14 : SimpleThread("server_thread"), | 15 : SimpleThread("server_thread"), |
15 listening_(true, false), | 16 listening_(true, false), |
16 quit_(true, false), | 17 quit_(true, false), |
17 server_(config), | 18 server_(config, supported_versions), |
18 address_(address), | 19 address_(address), |
19 port_(0) { | 20 port_(0) { |
20 if (strike_register_no_startup_period) { | 21 if (strike_register_no_startup_period) { |
21 server_.SetStrikeRegisterNoStartupPeriod(); | 22 server_.SetStrikeRegisterNoStartupPeriod(); |
22 } | 23 } |
23 } | 24 } |
24 | 25 |
25 ServerThread::~ServerThread() { | 26 ServerThread::~ServerThread() { |
26 } | 27 } |
27 | 28 |
(...skipping 16 matching lines...) Expand all Loading... |
44 int ServerThread::GetPort() { | 45 int ServerThread::GetPort() { |
45 port_lock_.Acquire(); | 46 port_lock_.Acquire(); |
46 int rc = port_; | 47 int rc = port_; |
47 port_lock_.Release(); | 48 port_lock_.Release(); |
48 return rc; | 49 return rc; |
49 } | 50 } |
50 | 51 |
51 } // namespace test | 52 } // namespace test |
52 } // namespace tools | 53 } // namespace tools |
53 } // namespace net | 54 } // namespace net |
OLD | NEW |