Adds a discovery beacon and probe to the client and removes BeaconService from the server.
16 lines
No EOL
488 B
C#
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);
|
|
}
|
|
} |