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 { |
(...skipping 14 matching lines...) Expand all Loading... |
25 supported_versions, | 25 supported_versions, |
26 server_initial_flow_control_receive_window), | 26 server_initial_flow_control_receive_window), |
27 address_(address), | 27 address_(address), |
28 port_(0), | 28 port_(0), |
29 initialized_(false) { | 29 initialized_(false) { |
30 if (strike_register_no_startup_period) { | 30 if (strike_register_no_startup_period) { |
31 server_.SetStrikeRegisterNoStartupPeriod(); | 31 server_.SetStrikeRegisterNoStartupPeriod(); |
32 } | 32 } |
33 } | 33 } |
34 | 34 |
35 ServerThread::~ServerThread() {} | 35 ServerThread::~ServerThread() { |
| 36 } |
36 | 37 |
37 void ServerThread::Initialize() { | 38 void ServerThread::Initialize() { |
38 if (initialized_) { | 39 if (initialized_) { |
39 return; | 40 return; |
40 } | 41 } |
41 | 42 |
42 server_.Listen(address_); | 43 server_.Listen(address_); |
43 | 44 |
44 port_lock_.Acquire(); | 45 port_lock_.Acquire(); |
45 port_ = server_.port(); | 46 port_ = server_.port(); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 } | 108 } |
108 QuicSession* session = dispatcher->session_map().begin()->second; | 109 QuicSession* session = dispatcher->session_map().begin()->second; |
109 if (session->IsCryptoHandshakeConfirmed()) { | 110 if (session->IsCryptoHandshakeConfirmed()) { |
110 confirmed_.Signal(); | 111 confirmed_.Signal(); |
111 } | 112 } |
112 } | 113 } |
113 | 114 |
114 } // namespace test | 115 } // namespace test |
115 } // namespace tools | 116 } // namespace tools |
116 } // namespace net | 117 } // namespace net |
OLD | NEW |