服务器玩家在线信息同步

This commit is contained in:
flswld
2023-03-17 14:30:49 +08:00
parent 658b577c20
commit 7de1d2e765
19 changed files with 286 additions and 77 deletions

View File

@@ -8,6 +8,7 @@ import (
"syscall"
"time"
"hk4e/anticheat/handle"
"hk4e/common/config"
"hk4e/common/mq"
"hk4e/common/rpc"
@@ -63,6 +64,8 @@ func Run(ctx context.Context, configFile string) error {
messageQueue := mq.NewMessageQueue(api.ANTICHEAT, APPID, client)
defer messageQueue.Close()
handle.NewHandle(messageQueue)
c := make(chan os.Signal, 1)
signal.Notify(c, syscall.SIGHUP, syscall.SIGQUIT, syscall.SIGTERM, syscall.SIGINT)
for {