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 #include "net/tools/quic/test_tools/quic_server_peer.h" | 7 #include "net/tools/quic/test_tools/quic_server_peer.h" |
8 | 8 |
9 namespace net { | 9 namespace net { |
10 namespace tools { | 10 namespace tools { |
11 namespace test { | 11 namespace test { |
12 | 12 |
13 ServerThread::ServerThread(IPEndPoint address, | 13 ServerThread::ServerThread(IPEndPoint address, |
14 const QuicConfig& config, | 14 const QuicConfig& config, |
15 const QuicVersionVector& supported_versions, | 15 const QuicVersionVector& supported_versions, |
16 bool strike_register_no_startup_period, | 16 bool strike_register_no_startup_period) |
17 uint32 server_initial_flow_control_receive_window) | |
18 : SimpleThread("server_thread"), | 17 : SimpleThread("server_thread"), |
19 confirmed_(true, false), | 18 confirmed_(true, false), |
20 pause_(true, false), | 19 pause_(true, false), |
21 paused_(true, false), | 20 paused_(true, false), |
22 resume_(true, false), | 21 resume_(true, false), |
23 quit_(true, false), | 22 quit_(true, false), |
24 server_(config, | 23 server_(config, supported_versions), |
25 supported_versions, | |
26 server_initial_flow_control_receive_window), | |
27 address_(address), | 24 address_(address), |
28 port_(0), | 25 port_(0), |
29 initialized_(false) { | 26 initialized_(false) { |
30 if (strike_register_no_startup_period) { | 27 if (strike_register_no_startup_period) { |
31 server_.SetStrikeRegisterNoStartupPeriod(); | 28 server_.SetStrikeRegisterNoStartupPeriod(); |
32 } | 29 } |
33 } | 30 } |
34 | 31 |
35 ServerThread::~ServerThread() {} | 32 ServerThread::~ServerThread() {} |
36 | 33 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 } | 104 } |
108 QuicSession* session = dispatcher->session_map().begin()->second; | 105 QuicSession* session = dispatcher->session_map().begin()->second; |
109 if (session->IsCryptoHandshakeConfirmed()) { | 106 if (session->IsCryptoHandshakeConfirmed()) { |
110 confirmed_.Signal(); | 107 confirmed_.Signal(); |
111 } | 108 } |
112 } | 109 } |
113 | 110 |
114 } // namespace test | 111 } // namespace test |
115 } // namespace tools | 112 } // namespace tools |
116 } // namespace net | 113 } // namespace net |
OLD | NEW |