This commit is contained in:
aozhiwei 2023-08-09 17:56:15 +08:00
parent 2837fb3d08
commit 9cdb5698be

View File

@ -1,6 +1,10 @@
package main
import (
"time"
"fmt"
"q5"
"f5"
)
@ -10,12 +14,34 @@ type App_ struct {
var App = new (App_)
func (this *App_) Init() {
f5.App = &this.App_
f5.App.SetPkgName("imserver")
this.App_.Init()
go this.goReportServerState();
}
func (this *App_) UnInit() {
this.App_.UnInit()
}
func (this *App_) goReportServerState() {
for (true) {
params := q5.NewMxoObject()
params.SetXValue("node_id", q5.NewXInt32(1))
params.SetXValue("instance_id", q5.NewXInt32(1))
params.SetXValue("ip", q5.NewXString("192.168.100.39"))
params.SetXValue("port", q5.NewXInt32(3333))
params.SetXValue("online_num", q5.NewXInt32(1))
params.SetXValue("room_num", q5.NewXInt32(1))
params.SetXValue("channel", q5.NewXInt32(1))
params.SetXValue("alive_count", q5.NewXInt32(1))
params.SetXValue("servicing", q5.NewXInt32(1))
_, err := q5.HttpGet(
"http://192.168.100.45:7821/webapp/index.php?c=GS&a=report&",
params.AsXObject())
fmt.Println(err);
time.Sleep(time.Duration(1) * time.Second)
}
}