1
This commit is contained in:
parent
b9582b52c2
commit
77163513fc
@ -12,7 +12,6 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type App struct {
|
type App struct {
|
||||||
f5.App_
|
|
||||||
msgMutex sync.Mutex
|
msgMutex sync.Mutex
|
||||||
msgList q5.ListHead
|
msgList q5.ListHead
|
||||||
workList q5.ListHead
|
workList q5.ListHead
|
||||||
@ -21,9 +20,9 @@ type App struct {
|
|||||||
var app = new (App)
|
var app = new (App)
|
||||||
|
|
||||||
func (this *App) Init() {
|
func (this *App) Init() {
|
||||||
f5.App = &this.App_
|
//f5.App = &this.F5App
|
||||||
f5.App.SetPkgName("imserver")
|
//f5.App.SetPkgName("imserver")
|
||||||
this.App_.Init(this.Update)
|
//this.F5App.Init(this.Update)
|
||||||
this.msgList.Init(nil)
|
this.msgList.Init(nil)
|
||||||
this.workList.Init(nil)
|
this.workList.Init(nil)
|
||||||
f5.LoadMetaTable(mt.Table)
|
f5.LoadMetaTable(mt.Table)
|
||||||
@ -37,7 +36,7 @@ func (this *App) Init() {
|
|||||||
func (this *App) UnInit() {
|
func (this *App) UnInit() {
|
||||||
handlerMgr.UnInit()
|
handlerMgr.UnInit()
|
||||||
wspListener.UnInit()
|
wspListener.UnInit()
|
||||||
this.App_.UnInit()
|
//this.F5App.UnInit()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *App) Update() {
|
func (this *App) Update() {
|
||||||
@ -89,5 +88,9 @@ func (this *App) addNetMsg(hdr *f5.MsgHdr) {
|
|||||||
defer this.msgMutex.Unlock()
|
defer this.msgMutex.Unlock()
|
||||||
this.msgList.AddTail(&hdr.Entry);
|
this.msgList.AddTail(&hdr.Entry);
|
||||||
}
|
}
|
||||||
this.NotifyLoopCond()
|
//this.NotifyLoopCond()
|
||||||
|
}
|
||||||
|
|
||||||
|
func (this *App) GetPkgName() string {
|
||||||
|
return "imserver"
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"f5"
|
||||||
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
app.Init()
|
f5.Run(app)
|
||||||
app.Run()
|
|
||||||
app.UnInit()
|
|
||||||
}
|
}
|
||||||
|
2
third_party/f5
vendored
2
third_party/f5
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 81321f5d0cf5bea5da63c746318f6a5be6e32aaf
|
Subproject commit c6e4546c133727b954c0f6745e70dadbeab50f1a
|
Loading…
x
Reference in New Issue
Block a user