MCPcopy Create free account
hub / github.com/MertJSX/folderhost / GetClientsCount

Function GetClientsCount

utils/web_socket_clients.go:87–97  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

85}
86
87func GetClientsCount(path string) int {
88 clientsMu.RLock()
89 defer clientsMu.RUnlock()
90 count := 0
91 for _, client := range clients {
92 if client.Path == path {
93 count++
94 }
95 }
96 return count
97}
98
99func GetActiveFileCount() int {
100 clientsMu.RLock()

Callers 2

updateClientsCountFunction · 0.92
WatcherDestroyerFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected