Keep local version of files
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
|
||||
public static class GetAvailablePort
|
||||
{
|
||||
|
||||
public static int GetAvailableUdpPort()
|
||||
{
|
||||
using var socket = new Socket(
|
||||
AddressFamily.InterNetwork,
|
||||
SocketType.Dgram,
|
||||
ProtocolType.Udp
|
||||
);
|
||||
|
||||
socket.Bind(new IPEndPoint(IPAddress.Any, 0));
|
||||
|
||||
return ((IPEndPoint)socket.LocalEndPoint).Port;
|
||||
}
|
||||
}
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
|
||||
public static class GetAvailablePort
|
||||
{
|
||||
|
||||
public static int GetAvailableUdpPort()
|
||||
{
|
||||
using var socket = new Socket(
|
||||
AddressFamily.InterNetwork,
|
||||
SocketType.Dgram,
|
||||
ProtocolType.Udp
|
||||
);
|
||||
|
||||
socket.Bind(new IPEndPoint(IPAddress.Any, 0));
|
||||
|
||||
return ((IPEndPoint)socket.LocalEndPoint).Port;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user