void AgentEngine::run() { // Inform_Machine_Information(); // Create the command process thread pool InitConnectData(); AgentThreadDataInit(); #ifdef WIN32 g_process_command_threads = ThreadPool::Create(3, 1024, 300); #else g_process_command_threads = ThreadPool::Create(3, 1024, 300, NULL); #endif // Create communication threads g_communication_thread = new (std::nothrow)NetThread(); g_communication_thread->Start(); #ifdef WIN32 Sleep(8000); #else sleep(5); #endif // Create heart beat thread( upload system information with fix interval) g_heartbeat_thread = new (std::nothrow)HBThread(); g_heartbeat_thread->Start(); #ifndef WIN32 while(false==Daemon::Instance()->IsStop()) { int now = time(NULL); sleep(1); } stop(); #endif }
void D_ConnectNetGame(void) { net_connect_data_t connect_data; InitConnectData(&connect_data); netgame = D_InitNetGame(&connect_data); //! // @category net // // Start the game playing as though in a netgame with a single // player. This can also be used to play back single player netgame // demos. // if (M_CheckParm("-solo-net") > 0) { netgame = true; } }