Class MulticastMrpDiscovery
- Namespace
- AppleTvControlLibrary.Discovery.Mrp
- Assembly
- AppleTvControlLibrary.Discovery.dll
Discovers MRP (Media Remote Protocol) devices by sending DNS-SD PTR queries to the mDNS multicast group and collecting responses.
public sealed class MulticastMrpDiscovery : IMrpDiscovery
- Inheritance
-
MulticastMrpDiscovery
- Implements
- Inherited Members
Methods
DiscoveryAsync(string, TimeSpan, CancellationToken)
Discovers an MRP device by its mDNS service instance name and completes as soon as that service has been fully resolved.
public static Task<MrpDiscoveryResult?> DiscoveryAsync(string appleTvName, TimeSpan timeout, CancellationToken cancellationToken = default)
Parameters
appleTvNamestringThe exact mDNS service instance name to locate.
timeoutTimeSpanThe maximum time to wait for the named device.
cancellationTokenCancellationTokenA token to cancel the lookup.
Returns
- Task<MrpDiscoveryResult>
The matching device, or null when it is not discovered before the timeout.
ScanAsync(TimeSpan, CancellationToken)
Scans the network for MRP devices.
public Task<IReadOnlyList<MrpDiscoveryResult>> ScanAsync(TimeSpan timeout, CancellationToken cancellationToken = default)
Parameters
timeoutTimeSpanHow long to wait for responses.
cancellationTokenCancellationTokenA token to cancel the scan.
Returns
- Task<IReadOnlyList<MrpDiscoveryResult>>
The discovered MRP devices.