LANCommander/LANCommander.Server/Startup/Beacon.cs
Pat Hartl 041a0069ee Add DiscoveryBeacon, DiscoveryProbe, new beacon message
Adds a discovery beacon and probe to the client and removes BeaconService from the server.
2025-04-23 21:23:33 -05:00

16 lines
No EOL
488 B
C#

using LANCommander.SDK;
using LANCommander.Server.Services;
namespace LANCommander.Server.Startup;
public static class Beacon
{
public static async Task StartBeaconAsync(this WebApplication app)
{
var settings = SettingService.GetSettings();
var client = app.Services.GetRequiredService<Client>();
if (settings.Beacon.Enabled)
await client.Beacon.StartBeaconAsync(settings.Beacon.Port, settings.Beacon.Address, settings.Beacon.Name);
}
}