move tcp.PickPort to its own package

This commit is contained in:
Darien Raymond
2018-03-01 11:53:39 +01:00
parent a7d467992d
commit af29e42771
14 changed files with 94 additions and 85 deletions
+4 -4
View File
@@ -32,7 +32,7 @@ func TestDokodemoTCP(t *testing.T) {
defer tcpServer.Close()
userID := protocol.NewID(uuid.New())
serverPort := pickPort()
serverPort := tcp.PickPort()
serverConfig := &core.Config{
App: []*serial.TypedMessage{
serial.ToTypedMessage(&log.Config{
@@ -64,7 +64,7 @@ func TestDokodemoTCP(t *testing.T) {
},
}
clientPort := uint32(pickPort())
clientPort := uint32(tcp.PickPort())
clientPortRange := uint32(5)
clientConfig := &core.Config{
App: []*serial.TypedMessage{
@@ -145,7 +145,7 @@ func TestDokodemoUDP(t *testing.T) {
defer udpServer.Close()
userID := protocol.NewID(uuid.New())
serverPort := pickPort()
serverPort := tcp.PickPort()
serverConfig := &core.Config{
Inbound: []*core.InboundHandlerConfig{
{
@@ -171,7 +171,7 @@ func TestDokodemoUDP(t *testing.T) {
},
}
clientPort := uint32(pickPort())
clientPort := uint32(tcp.PickPort())
clientPortRange := uint32(5)
clientConfig := &core.Config{
Inbound: []*core.InboundHandlerConfig{