-void WinService::waitForStop()\r
-{\r
- if(!started_)\r
- AnytunError::throwErr() << "Service not started correctly";\r
- \r
- reportStatus(SERVICE_RUNNING, NO_ERROR);\r
- WaitForSingleObject(stop_event_, INFINITE);\r
- reportStatus(SERVICE_STOP_PENDING, NO_ERROR);\r
- cLog.msg(Log::PRIO_NOTICE) << "WinService received stop signal, exitting";\r
-}\r
-\r
-void WinService::stop()\r
-{\r
- if(!started_)\r
- AnytunError::throwErr() << "Service not started correctly";\r
-\r
- reportStatus(SERVICE_STOPPED, NO_ERROR);\r
-}\r
-\r
-int real_main(int argc, char* argv[]);\r