上传网关日志开关
This commit is contained in:
parent
acbeae031c
commit
c251a63adc
@ -10,6 +10,8 @@ import (
|
|||||||
|
|
||||||
type (
|
type (
|
||||||
Options struct {
|
Options struct {
|
||||||
|
Debug bool //日志开关
|
||||||
|
GinDebug bool //web引擎日志开关
|
||||||
ListenPort int //websocket 监听端口
|
ListenPort int //websocket 监听端口
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -25,11 +25,9 @@ func (this *WSServiceComp) Init(service core.IService, module core.IModule, comp
|
|||||||
err = this.ModuleCompBase.Init(service, module, comp, options)
|
err = this.ModuleCompBase.Init(service, module, comp, options)
|
||||||
this.options = options.(*Options)
|
this.options = options.(*Options)
|
||||||
this.module = module.(IGateway)
|
this.module = module.(IGateway)
|
||||||
this.gin, err = gin.NewSys(gin.SetListenPort(this.options.ListenPort))
|
this.gin, err = gin.NewSys(gin.SetListenPort(this.options.ListenPort), gin.SetDebug(this.options.GinDebug))
|
||||||
|
|
||||||
// 游戏业务逻辑处理
|
// 游戏业务逻辑处理
|
||||||
this.gin.GET("/gateway", this.ws)
|
this.gin.GET("/gateway", this.ws)
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user