Exemple #1
0
def run():
        #应用程序初始化
        daemon.hook_signal()
        daemon.init()
        
        try:
                init()
        except Exception, e:
                daemon.dlog("init error")
                daemon.dlog("%s", traceback.format_exc())
Exemple #2
0
        
        #注销国家数据接受处理
        daemon.unregister_msg_handler(message.MSG_DB_RECV_COUNTRY_DATA)
        
        #注销充值数据接受处理
        daemon.unregister_msg_handler(message.MSG_DB_NEW_ORDER)
        daemon.unregister_msg_handler(message.MSG_DB_SETTLE_ORDER)
               
####主程序入口函数
def run():
        #应用程序初始化
        daemon.hook_signal()
        daemon.init()
        
        try:
                init()
        except Exception, e:
                daemon.dlog("init error")
                daemon.dlog("%s", traceback.format_exc())
        
        ######################################################################
        try:
                daemon.main_loop()
        except Exception, e:
                daemon.dlog("game loop error")
                daemon.dlog("%s", traceback.format_exc())
        
        stop()
        
        #应用程序退出
        daemon.stop()