1
This commit is contained in:
parent
40c25c5a0d
commit
4235dd3935
@ -8,15 +8,15 @@ import (
|
||||
. "main/common"
|
||||
)
|
||||
|
||||
type App struct {
|
||||
type app struct {
|
||||
netMsgQueue q5.Queue
|
||||
}
|
||||
|
||||
func (this *App) GetPkgName() string {
|
||||
func (this *app) GetPkgName() string {
|
||||
return "imserver"
|
||||
}
|
||||
|
||||
func (this *App) Init() {
|
||||
func (this *app) Init() {
|
||||
this.netMsgQueue.Init()
|
||||
f5.LoadMetaTable(mt.Table)
|
||||
this.registerDataSources()
|
||||
@ -28,7 +28,7 @@ func (this *App) Init() {
|
||||
//roomMgr.init()
|
||||
}
|
||||
|
||||
func (this *App) UnInit() {
|
||||
func (this *app) UnInit() {
|
||||
//roomMgr.unInit()
|
||||
//httpListener.unInit()
|
||||
//playerMgr.unInit()
|
||||
@ -36,7 +36,7 @@ func (this *App) UnInit() {
|
||||
//wspListener.unInit()
|
||||
}
|
||||
|
||||
func (this *App) Update() {
|
||||
func (this *app) Update() {
|
||||
this.netMsgQueue.Fetch()
|
||||
/*
|
||||
for !this.netMsgQueue.WorkList.Empty() {
|
||||
@ -70,12 +70,12 @@ func (this *App) Update() {
|
||||
}*/
|
||||
}
|
||||
|
||||
func (this *App) addNetMsg(hdr *f5.MsgHdr) {
|
||||
func (this *app) addNetMsg(hdr *f5.MsgHdr) {
|
||||
this.netMsgQueue.Push(&hdr.Entry)
|
||||
f5.GetApp().NotifyLoopCond()
|
||||
}
|
||||
|
||||
func (this *App) registerDataSources() {
|
||||
func (this *app) registerDataSources() {
|
||||
f5.GetJsStyleDb().RegisterDataSource(
|
||||
GAME_DB,
|
||||
mt.Table.GameDb.GetById(0).GetHost(),
|
||||
|
@ -1,5 +1,5 @@
|
||||
package app
|
||||
|
||||
func GetApp() *App {
|
||||
func GetApp() *app {
|
||||
return nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user