Skip to content

GetStatsOnline #4199

Answered by the2pizza
the2pizza asked this question in Q&A
Discussion options

You must be logged in to vote

Ok seems I found.

From the source code

	list := c.ipList

	if ip == "127.0.0.1" {
		return
	}
	if _, ok := list[ip]; !ok {
		c.access.Lock()
		list[ip] = time.Now()
		c.access.Unlock()
	}
	if time.Since(c.lastCleanup) > c.cleanupPeriod {
		list = c.RemoveExpiredIPs(list)
		c.lastCleanup = time.Now()
	}

	c.value = len(list)
	c.ipList = list
}

The value shows amount of connections from different IP-addresses per user.

Thank you folks, now I can work with this

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by the2pizza
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant