实现游戏大厅与房间模块:玩法插件化、匹配与房间生命周期管理
This commit is contained in:
@@ -14,6 +14,7 @@ import (
|
||||
"time"
|
||||
|
||||
"git.lzcwy.cn/zhengchiliu/zt-online-game-backend/global"
|
||||
"git.lzcwy.cn/zhengchiliu/zt-online-game-backend/internal/boot"
|
||||
"git.lzcwy.cn/zhengchiliu/zt-online-game-backend/internal/mysqlmodel"
|
||||
"git.lzcwy.cn/zhengchiliu/zt-online-game-backend/internal/routers"
|
||||
"git.lzcwy.cn/zhengchiliu/zt-online-game-backend/pkg/cos"
|
||||
@@ -36,11 +37,15 @@ func init() {
|
||||
}
|
||||
|
||||
setupCosClient()
|
||||
|
||||
boot.InitWS() // 初始化 WebSocket 模块:房间管理器、匹配器与消息路由
|
||||
}
|
||||
|
||||
func main() {
|
||||
gin.SetMode(global.ServerSetting.RunMode)
|
||||
|
||||
boot.Start(context.Background()) // 启动匹配队列扫描(随进程退出结束)
|
||||
|
||||
router := routers.NewRouter()
|
||||
|
||||
s := &http.Server{
|
||||
|
||||
Reference in New Issue
Block a user