initial project, implement binary format of display
This commit is contained in:
commit
ea7f12b0c2
1 changed files with 430 additions and 0 deletions
14
TanksServer/ServicePointDisplay.cs
Normal file
14
TanksServer/ServicePointDisplay.cs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
using System.Net.Sockets;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
namespace TanksServer;
|
||||
|
||||
public class ServicePointDisplay(IOptions<ServicePointDisplayConfiguration> options)
|
||||
{
|
||||
private readonly UdpClient _udpClient = new(options.Value.Hostname, options.Value.Port);
|
||||
|
||||
public ValueTask<int> Send(DisplayPixelBuffer buffer)
|
||||
{
|
||||
return _udpClient.SendAsync(buffer.Data);
|
||||
}
|
||||
}
|
||||
Reference in a new issue