void theLoop::Looper() { #ifdef _WIN32 KillTimer(NULL, srvLoopTimer); #endif // PPK ... two loop stategy for saving badwith if(bRecv == true) { ReceiveLoop(); } else { SendLoop(); eventqueue->ProcessEvents(); } if(bServerTerminated == false) { bRecv = !bRecv; #ifdef _WIN32 srvLoopTimer = SetTimer(NULL, 0, 100, NULL); if(srvLoopTimer == 0) { AppendDebugLog("%s - [ERR] Cannot start Looper in theLoop::Looper\n", 0); exit(EXIT_FAILURE); } #endif } else { // tell the scripts about the end ScriptManager->OnExit(); // send last possible global data g_GlobalDataQueue->SendFinalQueue(); ServerFinalStop(true); } }
void AsiPort::Run() { if( _direction.compare("send") == 0 ){ SendLoop(); } else{ RevLoop(); } }