This commit is contained in:
aozhiwei 2023-08-09 18:43:47 +08:00
parent 9cdb5698be
commit a6d26d1a2b
2 changed files with 37 additions and 1 deletions

View File

@ -0,0 +1,36 @@
package main
import (
"net"
)
type GGListener_ struct {
listener net.Listener
}
var GGListener = new (GGListener_)
func (this *GGListener_) Init() {
listener, err := net.Listen("tcp", "0.0.0.0:8888")
if err != nil {
} else {
this.listener = listener
go this.accept()
}
}
func (this *GGListener_) UnInit() {
}
func (this *GGListener_) accept() {
for {
conn, err := this.listener.Accept()
if err == nil {
go this.socketRead(conn)
}
}
}
func (this *GGListener_) socketRead(conn net.Conn) {
}

View File

@ -27,7 +27,7 @@ func (this *App_) UnInit() {
}
func (this *App_) goReportServerState() {
for (true) {
for {
params := q5.NewMxoObject()
params.SetXValue("node_id", q5.NewXInt32(1))
params.SetXValue("instance_id", q5.NewXInt32(1))