Initial qiwei secondary development handoff

This commit is contained in:
2026-06-23 21:11:20 +08:00
commit 858cb68f4f
207 changed files with 52782 additions and 0 deletions

27
helper/client_helper.go Normal file
View File

@@ -0,0 +1,27 @@
package main
// GetActiveClientCount 返回当前活跃的客户端数量
func GetActiveClientCount() int {
globalLogger.Info("获取活跃客户端数量")
// 获取当前活跃的客户端数量
// 这里需要实现实际的逻辑来获取活跃客户端
// 暂时返回模拟数据
clientCount := recognizedClientCount()
globalLogger.Info("当前活跃客户端数量: %d", clientCount)
return clientCount
}
// GetClientMap 返回客户端映射(用于调试)
func GetClientMap() map[uint32]string {
clientIdMutex.Lock()
defer clientIdMutex.Unlock()
result := make(map[uint32]string, len(globalClientMap))
for clientID, userID := range globalClientMap {
if userID != "" {
result[clientID] = userID
}
}
return result
}