private void OnCommand(int src, int dest, string command)
{
const string c_QuitDataStore = "QuitDataStore";
const string c_ReloadConfig = "ReloadConfig";
try {
if (0 == command.CompareTo(c_QuitDataStore)) {
LogSys.Log(LOG_TYPE.MONITOR, "receive {0} command, save data and then quitting ...", command);
if (!m_WaitQuit) {
DataCacheSystem.Instance.QueueAction(DataCacheSystem.Instance.DoLastSave);
m_WaitQuit = true;
}
} else if (0 == command.CompareTo(c_ReloadConfig)) {
CenterClientApi.ReloadConfigScript();
DataCacheConfig.Init();
LogSys.Log(LOG_TYPE.WARN, "receive {0} command.", command);
}
} catch (Exception ex) {
LogSys.Log(LOG_TYPE.ERROR, "Exception {0}\n{1}", ex.Message, ex.StackTrace);
}
}