This commit is contained in:
2025-01-07 16:00:24 +08:00
parent d7b004ea80
commit a467e69f7b
5 changed files with 36 additions and 6 deletions

View File

@@ -190,6 +190,17 @@ func (h *TCPHandler) HandleClient(conn net.Conn) {
continue
}
broadcastMessage(message)
case "db":
//if !client.IsAuth {
// fmt.Printf("来自未授权客户端的消息 %s\n", conn.RemoteAddr())
// conn.Close()
// return
//}
if err := h.Server.Db(client, message); err != nil {
fmt.Printf("获取客户端音量分贝错误: %v\n", err)
continue
}
broadcastMessage(message)
default:
if !client.IsAuth {
fmt.Printf("来自未授权客户端的消息 %s\n", conn.RemoteAddr())