Table of Contents

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

appleTvName string

The exact mDNS service instance name to locate.

timeout TimeSpan

The maximum time to wait for the named device.

cancellationToken CancellationToken

A 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

timeout TimeSpan

How long to wait for responses.

cancellationToken CancellationToken

A token to cancel the scan.

Returns

Task<IReadOnlyList<MrpDiscoveryResult>>

The discovered MRP devices.