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

Side by Side Diff: net/tools/quic/test_tools/server_thread.cc

Issue 1752823002: n/a (QUIC toy client/server changes) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@115400573
Patch Set: Revert to Patch Set 1 Created 4 years, 9 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/test_tools/quic_client_peer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/quic/test_tools/crypto_test_utils.h" 7 #include "net/quic/test_tools/crypto_test_utils.h"
8 #include "net/tools/quic/quic_dispatcher.h" 8 #include "net/tools/quic/quic_dispatcher.h"
9 #include "net/tools/quic/test_tools/quic_server_peer.h" 9 #include "net/tools/quic/test_tools/quic_server_peer.h"
10 10
(...skipping 18 matching lines...) Expand all
29 } 29 }
30 } 30 }
31 31
32 ServerThread::~ServerThread() {} 32 ServerThread::~ServerThread() {}
33 33
34 void ServerThread::Initialize() { 34 void ServerThread::Initialize() {
35 if (initialized_) { 35 if (initialized_) {
36 return; 36 return;
37 } 37 }
38 38
39 server_->Listen(address_); 39 server_->CreateUDPSocketAndListen(address_);
40 40
41 port_lock_.Acquire(); 41 port_lock_.Acquire();
42 port_ = server_->port(); 42 port_ = server_->port();
43 port_lock_.Release(); 43 port_lock_.Release();
44 44
45 initialized_ = true; 45 initialized_ = true;
46 } 46 }
47 47
48 void ServerThread::Run() { 48 void ServerThread::Run() {
49 if (!initialized_) { 49 if (!initialized_) {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 return; 103 return;
104 } 104 }
105 QuicSession* session = dispatcher->session_map().begin()->second; 105 QuicSession* session = dispatcher->session_map().begin()->second;
106 if (session->IsCryptoHandshakeConfirmed()) { 106 if (session->IsCryptoHandshakeConfirmed()) {
107 confirmed_.Signal(); 107 confirmed_.Signal();
108 } 108 }
109 } 109 }
110 110
111 } // namespace test 111 } // namespace test
112 } // namespace net 112 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/test_tools/quic_client_peer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698