MCPcopy Create free account
hub / github.com/OpenZWave/open-zwave / DNSThreadProc

Method DNSThreadProc

cpp/src/DNSThread.cpp:65–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65void DNSThread::DNSThreadProc
66(
67Event* _exitEvent
68)
69{
70 Log::Write(LogLevel_Info, "Starting DNSThread");
71 while( true )
72 {
73 // DNSThread has been initialized
74 const uint32 count = 2;
75
76 Wait* waitObjects[count];
77
78 int32 timeout = Wait::Timeout_Infinite;
79// timeout = 5000;
80
81
82 waitObjects[0] = _exitEvent; // Thread must exit.
83 waitObjects[1] = m_dnsRequestEvent; // DNS Request
84 // Wait for something to do
85
86 int32 res = Wait::Multiple( waitObjects, count, timeout );
87
88 switch (res) {
89 case -1: /* timeout */
90 Log::Write(LogLevel_Warning, "DNSThread Timeout...");
91 break;
92 case 0: /* exitEvent */
93 Log::Write(LogLevel_Info, "Stopping DNSThread");
94 return;
95 case 1: /* dnsEvent */
96 processResult();
97 break;
98 }
99 }
100}
101
102bool DNSThread::sendRequest
103(

Callers 1

DNSThreadEntryPointMethod · 0.80

Calls 1

WriteFunction · 0.85

Tested by

no test coverage detected