mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-02 23:47:07 -05:00
comments
This commit is contained in:
parent
2f550186ac
commit
2e1c2b95e0
@ -5,7 +5,6 @@ import (
|
|||||||
"crypto/md5"
|
"crypto/md5"
|
||||||
"hash"
|
"hash"
|
||||||
|
|
||||||
"v2ray.com/core/common/errors"
|
|
||||||
"v2ray.com/core/common/uuid"
|
"v2ray.com/core/common/uuid"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -13,10 +12,6 @@ const (
|
|||||||
IDBytesLen = 16
|
IDBytesLen = 16
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
|
||||||
InvalidID = errors.New("Invalid ID.")
|
|
||||||
)
|
|
||||||
|
|
||||||
type IDHash func(key []byte) hash.Hash
|
type IDHash func(key []byte) hash.Hash
|
||||||
|
|
||||||
func DefaultIDHash(key []byte) hash.Hash {
|
func DefaultIDHash(key []byte) hash.Hash {
|
||||||
@ -29,6 +24,7 @@ type ID struct {
|
|||||||
cmdKey [IDBytesLen]byte
|
cmdKey [IDBytesLen]byte
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Equals returns true if this ID equals to the other one.
|
||||||
func (v *ID) Equals(another *ID) bool {
|
func (v *ID) Equals(another *ID) bool {
|
||||||
return v.uuid.Equals(another.uuid)
|
return v.uuid.Equals(another.uuid)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user