Skip to content

Commit

Permalink
Remove TestUtils again
Browse files Browse the repository at this point in the history
  • Loading branch information
ShortDevelopment committed Jan 4, 2025
1 parent ba96495 commit 1a171e7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 17 deletions.
13 changes: 0 additions & 13 deletions lib/ShortDev.Microsoft.ConnectedDevices/TestUtils.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public EndpointInfo GetEndpoint()
public event DeviceConnectedEventHandler? DeviceConnected;
public async Task Listen(CancellationToken cancellationToken)
{
var listener = _listener ??= new(TestUtils.ListenAddress, TcpPort);
var listener = _listener ??= new(IPAddress.Any, TcpPort);
listener.Start();

try
Expand Down Expand Up @@ -88,7 +88,7 @@ static UdpClient CreateUdpClient(int port)
}

client.Client.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true);
client.Client.Bind(new IPEndPoint(TestUtils.ListenAddress, port));
client.Client.Bind(new IPEndPoint(IPAddress.Any, port));

return client;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ ConnectedDevicesPlatform CreateDevice(DeviceContainer network, string name, stri

static void UseTcp(ConnectedDevicesPlatform cdp, int tcpPort, int udpPort)
{
TestUtils.ListenLocalOnly();

NetworkHandler networkHandler = new(IPAddress.Loopback);
NetworkTransport networkTransport = new(networkHandler, tcpPort, udpPort);
cdp.AddTransport(networkTransport);
Expand Down

0 comments on commit 1a171e7

Please sign in to comment.