This commit is contained in:
azw 2023-08-13 11:54:05 +08:00
parent b9582b52c2
commit 77163513fc
3 changed files with 15 additions and 10 deletions

View File

@ -12,7 +12,6 @@ import (
)
type App struct {
f5.App_
msgMutex sync.Mutex
msgList q5.ListHead
workList q5.ListHead
@ -21,9 +20,9 @@ type App struct {
var app = new (App)
func (this *App) Init() {
f5.App = &this.App_
f5.App.SetPkgName("imserver")
this.App_.Init(this.Update)
//f5.App = &this.F5App
//f5.App.SetPkgName("imserver")
//this.F5App.Init(this.Update)
this.msgList.Init(nil)
this.workList.Init(nil)
f5.LoadMetaTable(mt.Table)
@ -37,7 +36,7 @@ func (this *App) Init() {
func (this *App) UnInit() {
handlerMgr.UnInit()
wspListener.UnInit()
this.App_.UnInit()
//this.F5App.UnInit()
}
func (this *App) Update() {
@ -89,5 +88,9 @@ func (this *App) addNetMsg(hdr *f5.MsgHdr) {
defer this.msgMutex.Unlock()
this.msgList.AddTail(&hdr.Entry);
}
this.NotifyLoopCond()
//this.NotifyLoopCond()
}
func (this *App) GetPkgName() string {
return "imserver"
}

View File

@ -1,7 +1,9 @@
package main
import (
"f5"
)
func main() {
app.Init()
app.Run()
app.UnInit()
f5.Run(app)
}

2
third_party/f5 vendored

@ -1 +1 @@
Subproject commit 81321f5d0cf5bea5da63c746318f6a5be6e32aaf
Subproject commit c6e4546c133727b954c0f6745e70dadbeab50f1a