mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-11-12 15:27:16 -05:00
16 lines
208 B
Go
16 lines
208 B
Go
package testing
|
|
|
|
import (
|
|
"sync/atomic"
|
|
|
|
v2net "github.com/v2ray/v2ray-core/common/net"
|
|
)
|
|
|
|
var (
|
|
port = int32(30000)
|
|
)
|
|
|
|
func PickPort() v2net.Port {
|
|
return v2net.Port(uint16(atomic.AddInt32(&port, 1)))
|
|
}
|