1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-23 02:26:49 -05:00
v2fly/common/net/testing/port.go

14 lines
143 B
Go
Raw Normal View History

2015-11-01 15:32:08 -05:00
package testing
import (
"sync/atomic"
)
var (
port = int32(30000)
)
func PickPort() uint16 {
return uint16(atomic.AddInt32(&port, 1))
}