proper web socket close
This commit is contained in:
parent
bc8d5ad6d0
commit
154539488a
1 changed files with 129 additions and 64 deletions
|
|
@ -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; }
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue