Table of Contents

Class StaticCompanionDiscovery

Namespace
AppleTvControlLibrary.Discovery.Companion
Assembly
AppleTvControlLibrary.Discovery.dll

A discovery implementation that always returns a single, pre-configured device instead of performing an mDNS scan. Useful on hosts where multicast is unavailable or unreliable (see WP7 notes on Mono/embedded hosts), or when the address is already known.

public sealed class StaticCompanionDiscovery : ICompanionDiscovery
Inheritance
StaticCompanionDiscovery
Implements
Inherited Members

Remarks

Initializes a new instance of the StaticCompanionDiscovery class.

Constructors

StaticCompanionDiscovery(IPAddress, int, string, string?)

A discovery implementation that always returns a single, pre-configured device instead of performing an mDNS scan. Useful on hosts where multicast is unavailable or unreliable (see WP7 notes on Mono/embedded hosts), or when the address is already known.

public StaticCompanionDiscovery(IPAddress address, int port, string name = "", string? uniqueId = null)

Parameters

address IPAddress

The known address of the Companion Link device.

port int

The Companion Link port.

name string

An optional display name for the device.

uniqueId string

An optional stable unique identifier for the device.

Remarks

Initializes a new instance of the StaticCompanionDiscovery class.

Methods

ScanAsync(TimeSpan, CancellationToken)

Discovers the configured service endpoints.

public Task<IReadOnlyList<CompanionDiscoveryResult>> ScanAsync(TimeSpan timeout, CancellationToken cancellationToken = default)

Parameters

timeout TimeSpan

The discovery response window.

cancellationToken CancellationToken

A token used to cancel the operation.

Returns

Task<IReadOnlyList<CompanionDiscoveryResult>>

A task containing the discovered endpoints.