mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-21 09:36:34 -05:00
comments
This commit is contained in:
parent
fb7dd1a577
commit
d9cdfffc69
@ -20,6 +20,7 @@ type user struct {
|
||||
lastSec protocol.Timestamp
|
||||
}
|
||||
|
||||
// TimedUserValidator is a user Validator based on time.
|
||||
type TimedUserValidator struct {
|
||||
sync.RWMutex
|
||||
users []*user
|
||||
@ -34,6 +35,7 @@ type indexTimePair struct {
|
||||
timeInc uint32
|
||||
}
|
||||
|
||||
// NewTimedUserValidator creates a new TimedUserValidator.
|
||||
func NewTimedUserValidator(hasher protocol.IDHash) *TimedUserValidator {
|
||||
tuv := &TimedUserValidator{
|
||||
users: make([]*user, 0, 16),
|
||||
|
Loading…
Reference in New Issue
Block a user