OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2012 The WebRTC Project Authors. All rights reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #include "webrtc/examples/peerconnection/client/conductor.h" | 11 #include "webrtc/examples/peerconnection/client/conductor.h" |
12 #include "webrtc/examples/peerconnection/client/flagdefs.h" | 12 #include "webrtc/examples/peerconnection/client/flagdefs.h" |
13 #include "webrtc/examples/peerconnection/client/main_wnd.h" | 13 #include "webrtc/examples/peerconnection/client/main_wnd.h" |
14 #include "webrtc/examples/peerconnection/client/peer_connection_client.h" | 14 #include "webrtc/examples/peerconnection/client/peer_connection_client.h" |
15 #include "webrtc/base/checks.h" | 15 #include "webrtc/base/checks.h" |
16 #include "webrtc/base/ssladapter.h" | 16 #include "webrtc/base/ssladapter.h" |
17 #include "webrtc/base/win32socketinit.h" | 17 #include "webrtc/base/win32socketinit.h" |
18 #include "webrtc/base/win32socketserver.h" | 18 #include "webrtc/base/win32socketserver.h" |
19 | 19 |
20 | 20 |
21 int PASCAL wWinMain(HINSTANCE instance, HINSTANCE prev_instance, | 21 int PASCAL wWinMain(HINSTANCE instance, HINSTANCE prev_instance, |
22 wchar_t* cmd_line, int cmd_show) { | 22 wchar_t* cmd_line, int cmd_show) { |
23 rtc::EnsureWinsockInit(); | 23 rtc::EnsureWinsockInit(); |
24 rtc::Win32Thread w32_thread; | 24 rtc::Win32SocketServer w32_ss; |
| 25 rtc::Win32Thread w32_thread(&w32_ss); |
25 rtc::ThreadManager::Instance()->SetCurrentThread(&w32_thread); | 26 rtc::ThreadManager::Instance()->SetCurrentThread(&w32_thread); |
26 | 27 |
27 rtc::WindowsCommandLineArguments win_args; | 28 rtc::WindowsCommandLineArguments win_args; |
28 int argc = win_args.argc(); | 29 int argc = win_args.argc(); |
29 char **argv = win_args.argv(); | 30 char **argv = win_args.argv(); |
30 | 31 |
31 rtc::FlagList::SetFlagsFromCommandLine(&argc, argv, true); | 32 rtc::FlagList::SetFlagsFromCommandLine(&argc, argv, true); |
32 if (FLAG_help) { | 33 if (FLAG_help) { |
33 rtc::FlagList::Print(NULL, false); | 34 rtc::FlagList::Print(NULL, false); |
34 return 0; | 35 return 0; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 if (!wnd.PreTranslateMessage(&msg)) { | 69 if (!wnd.PreTranslateMessage(&msg)) { |
69 ::TranslateMessage(&msg); | 70 ::TranslateMessage(&msg); |
70 ::DispatchMessage(&msg); | 71 ::DispatchMessage(&msg); |
71 } | 72 } |
72 } | 73 } |
73 } | 74 } |
74 | 75 |
75 rtc::CleanupSSL(); | 76 rtc::CleanupSSL(); |
76 return 0; | 77 return 0; |
77 } | 78 } |
OLD | NEW |