1
This commit is contained in:
parent
4235dd3935
commit
33c2d6a622
@ -2,9 +2,8 @@ package app
|
||||
|
||||
import (
|
||||
"f5"
|
||||
"mt"
|
||||
"q5"
|
||||
_ "main/initialize"
|
||||
"mt"
|
||||
. "main/common"
|
||||
)
|
||||
|
||||
@ -20,20 +19,9 @@ func (this *app) Init() {
|
||||
this.netMsgQueue.Init()
|
||||
f5.LoadMetaTable(mt.Table)
|
||||
this.registerDataSources()
|
||||
|
||||
//handlerMgr.init()
|
||||
//playerMgr.init()
|
||||
//wspListener.init()
|
||||
//httpListener.init()
|
||||
//roomMgr.init()
|
||||
}
|
||||
|
||||
func (this *app) UnInit() {
|
||||
//roomMgr.unInit()
|
||||
//httpListener.unInit()
|
||||
//playerMgr.unInit()
|
||||
//handlerMgr.unInit()
|
||||
//wspListener.unInit()
|
||||
}
|
||||
|
||||
func (this *app) Update() {
|
||||
|
@ -1,14 +1,21 @@
|
||||
package initialize
|
||||
|
||||
import (
|
||||
"f5"
|
||||
|
||||
"main/global"
|
||||
"main/room"
|
||||
"main/player"
|
||||
"main/listener"
|
||||
"main/app"
|
||||
)
|
||||
|
||||
func init() {
|
||||
global.SetRoomMgr(room.GetRoomMgr())
|
||||
func Init() {
|
||||
app.GetApp().Init()
|
||||
listener.GetHandlerMgr().Init()
|
||||
global.SetPlayerMgr(player.GetPlayerMgr())
|
||||
global.SetRoomMgr(room.GetRoomMgr())
|
||||
global.SetWspListener(listener.GetWspListener())
|
||||
listener.GetHttpListener().Init()
|
||||
f5.Run(app.GetApp())
|
||||
}
|
||||
|
@ -3,3 +3,11 @@ package listener
|
||||
func GetWspListener() *WSPListener {
|
||||
return nil
|
||||
}
|
||||
|
||||
func GetHandlerMgr() *HandlerMgr {
|
||||
return nil
|
||||
}
|
||||
|
||||
func GetHttpListener() *httpListener {
|
||||
return nil
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ import (
|
||||
type HandlerMgr struct {
|
||||
}
|
||||
|
||||
func (this *HandlerMgr) init() {
|
||||
func (this *HandlerMgr) Init() {
|
||||
ss.RegHandlerId(int(ss.SSMessageIdE__SS_Ping), WSP_LISTENER_HANDLER_ID)
|
||||
ss.RegHandlerId(int(ss.SSMessageIdE__SS_WSP_SocketDisconnect), WSP_LISTENER_HANDLER_ID)
|
||||
|
||||
@ -18,5 +18,5 @@ func (this *HandlerMgr) init() {
|
||||
cs.RegHandlerId(int(cs.CMMessageIdE__CMLogin), PLAYER_MGR_HANDLER_ID)
|
||||
}
|
||||
|
||||
func (this *HandlerMgr) unInit() {
|
||||
func (this *HandlerMgr) UnInit() {
|
||||
}
|
||||
|
@ -9,11 +9,11 @@ type httpListener struct {
|
||||
httpServer *f5.HttpServer
|
||||
}
|
||||
|
||||
func (this *httpListener) init() {
|
||||
func (this *httpListener) Init() {
|
||||
this.httpServer = new (f5.HttpServer)
|
||||
this.httpServer.Init("imserver.httplistener", 1000 * 10)
|
||||
this.httpServer.Start(mt.Table.HallCluster.GetHttpListenPort())
|
||||
}
|
||||
|
||||
func (this *httpListener) unInit() {
|
||||
func (this *httpListener) UnInit() {
|
||||
}
|
||||
|
@ -1,11 +1,9 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"f5"
|
||||
|
||||
"main/app"
|
||||
"main/initialize"
|
||||
)
|
||||
|
||||
func main() {
|
||||
f5.Run(app.GetApp())
|
||||
initialize.Init()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user