1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-10-12 03:54:03 -04:00
This commit is contained in:
Darien Raymond
2017-02-20 11:25:05 +01:00
parent bf7906c7f0
commit 29d614fda5
5 changed files with 14 additions and 3 deletions

View File

@@ -63,6 +63,7 @@ func (v PortRange) Contains(port Port) bool {
return v.FromPort() <= port && port <= v.ToPort()
}
// SinglePortRange returns a PortRange contains a single port.
func SinglePortRange(v Port) *PortRange {
return &PortRange{
From: uint32(v),