-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.cpp
47 lines (28 loc) · 833 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include "main.h"
//================================
//================================
#define MUXER_IP "224.1.2.3"
#define MUXER_PORT 9010
//================================
//================================
extern char bind_ip[16];
extern thread_params_t gkThreadParams;
//================================
int main(int argc, char* argv[])
{
printInfo();
memset(bind_ip, 0, sizeof(bind_ip));
getLocalIp(bind_ip);
printf("localIp is: %s\n", bind_ip);
loadPublicCfg();
memcpy(gkThreadParams.pszControlIP, bind_ip, sizeof(bind_ip));
printf("control ip: %s\n", gkThreadParams.pszControlIP);
CreateGerneralThread(web_udp_thread);
CreateGerneralThread(web_process_thread);
while(1)
{
XPE_file_thread(&gkThreadParams);
Sleep(10);
}
return 0;
}