this allows ParaEngine to operate as a system service without GUI, such as in server mode.
More...
#include <ParaEngineService.h>
|
static void | Signal_Handler (int sig) |
|
static void | InitDaemon (void) |
| call this function before calling Run() to run as a linux daemon More...
|
|
|
typedef basic_waitable_timer< boost::chrono::steady_clock > | timer_type |
| the main timer that ticks 30 times a second
|
|
this allows ParaEngine to operate as a system service without GUI, such as in server mode.
normally, one should use CParaEngineApp, which is the stand ParaEngine Application with 3D graphics.
- Note
- : this class is cross platform.
§ AcceptKeyStroke()
void CParaEngineService::AcceptKeyStroke |
( |
bool |
bAccept = true | ) |
|
whether we will accept key stroke.
such as the "ENTER" key will terminate the program.
§ handle_timeout()
void CParaEngineService::handle_timeout |
( |
const boost::system::error_code & |
err | ) |
|
|
protected |
§ InitDaemon()
void CParaEngineService::InitDaemon |
( |
void |
| ) |
|
|
static |
call this function before calling Run() to run as a linux daemon
now entering daemon code, Be as verbose as possible when writing either to the syslog or your own logs. Debugging a daemon can be quite difficult when there isn't enough information available as to the status of the daemon.
§ Run()
int CParaEngineService::Run |
( |
const char * |
pCommandLine = NULL , |
|
|
CParaEngineApp * |
pApp = NULL |
|
) |
| |
this function does not return util service is stopped.
- Parameters
-
pCommandLine | the command line. |
pApp | if NULL, a new app is created. |
- Returns
- the exit code.
§ m_work_lifetime
boost::scoped_ptr<boost::asio::io_service::work> ParaEngine::CParaEngineService::m_work_lifetime |
|
protected |
Work for the private m_io_service_dispatcher to perform.
If we do not give the io_service some work to do then the io_service::run() function will exit immediately.
The documentation for this class was generated from the following files:
- Client/trunk/ParaEngineClient/Core/ParaEngineService.h
- Client/trunk/ParaEngineClient/Core/ParaEngineService.cpp