Class ProxyDiscoveryService
mDNS-based proxy discovery service that broadcasts proxy availability on the LAN. Allows mobile clients to discover the proxy without manual configuration. Also responds to mDNS queries from clients looking for the service.
public class ProxyDiscoveryService : IAsyncDisposable
- Inheritance
-
ProxyDiscoveryService
- Implements
- Inherited Members
Constructors
ProxyDiscoveryService(MdnsAnnouncerOptions)
Creates a new proxy discovery service with the specified options.
public ProxyDiscoveryService(MdnsAnnouncerOptions options)
Parameters
optionsMdnsAnnouncerOptionsConfiguration options for the announcer.
Exceptions
- ArgumentException
Thrown when the IP address is invalid.
Properties
IsRunning
Gets a value indicating whether the service is currently running.
public bool IsRunning { get; }
Property Value
Methods
DisposeAsync()
Disposes the service, stopping announcements if running.
public ValueTask DisposeAsync()
Returns
StartAsync(CancellationToken)
Starts the mDNS announcement service and begins listening for queries.
public Task StartAsync(CancellationToken ct = default)
Parameters
ctCancellationTokenCancellation token.
Returns
StopAsync()
Stops the mDNS announcement service and sends a goodbye packet.
public Task StopAsync()