proper web socket close

This commit is contained in:
Vinzenz Schroeter 2024-04-06 20:32:54 +02:00
commit 154539488a

View file

@ -3,7 +3,7 @@ using Microsoft.Extensions.Options;
namespace TanksServer;
public class ServicePointDisplay(IOptions<ServicePointDisplayConfiguration> options)
internal class ServicePointDisplay(IOptions<ServicePointDisplayConfiguration> options)
{
private readonly UdpClient _udpClient = new(options.Value.Hostname, options.Value.Port);
@ -12,3 +12,9 @@ public class ServicePointDisplay(IOptions<ServicePointDisplayConfiguration> opti
return _udpClient.SendAsync(buffer.Data);
}
}
internal class ServicePointDisplayConfiguration
{
public string Hostname { get; set; } = string.Empty;
public int Port { get; set; }
}