feat(config): 添加服务器调试模式配置和塔配置重构

- 在ServerList结构体中添加IsDebug字段用于调试模式标识
- 修改GetServerInfoList函数增加isdebug参数支持
- 移除硬编码的rpcaddr本地地址配置
- 重构塔配置模型,将tower_500和tower_600合并到tower_110
This commit is contained in:
2026-01-08 23:57:22 +08:00
parent 4d0464c76b
commit 971abd29ab
26 changed files with 221 additions and 291 deletions

View File

@@ -118,7 +118,7 @@ func (s *Server) OnTraffic(c gnet.Conn) (action gnet.Action) {
ws := c.Context().(*player.ClientData).Wsmsg
if ws.Tcp { //升级失败时候防止缓冲区溢出
return s.handleTcp(c)
return s.handleTCP(c)
}
@@ -135,7 +135,7 @@ func (s *Server) OnTraffic(c gnet.Conn) (action gnet.Action) {
if !ok { //升级失败,说明是tcp连接
ws.Tcp = true
return s.handleTcp(c)
return s.handleTCP(c)
}
// fmt.Println(ws.Buf.Bytes())
@@ -161,7 +161,7 @@ func (s *Server) OnTraffic(c gnet.Conn) (action gnet.Action) {
return gnet.None
}
func (s *Server) handleTcp(conn gnet.Conn) (action gnet.Action) {
func (s *Server) handleTCP(conn gnet.Conn) (action gnet.Action) {
conn.Context().(*player.ClientData).IsCrossDomain.Do(func() { //跨域检测
handle(conn)