Table of Contents

Class Service

Namespace
AppleTvControlLibrary.Discovery.Mdns
Assembly
AppleTvControlLibrary.Discovery.dll

Represents an MDNS service.

public sealed class Service
Inheritance
Service
Inherited Members

Remarks

Initializes a new instance of the Service class.

Constructors

Service(string, string, IPAddress?, int, IReadOnlyDictionary<string, string>)

Represents an MDNS service.

public Service(string type, string name, IPAddress? address, int port, IReadOnlyDictionary<string, string> properties)

Parameters

type string

The DNS-SD service type.

name string

The advertised service or device name.

address IPAddress

The discovered IP address, if available.

port int

The advertised service port.

properties IReadOnlyDictionary<string, string>

The DNS-SD TXT properties advertised by the service.

Remarks

Initializes a new instance of the Service class.

Properties

Address

Gets the resolved, non-link-local address of the service, if any.

public IPAddress? Address { get; }

Property Value

IPAddress

The resolved, non-link-local address of the service, if any.

Name

Gets the service instance name (e.g. "Living Room").

public string Name { get; }

Property Value

string

The service instance name (e.g. "Living Room").

Port

Gets the service port.

public int Port { get; }

Property Value

int

The service port.

Properties

Gets the TXT record properties, keyed case-insensitively.

public IReadOnlyDictionary<string, string> Properties { get; }

Property Value

IReadOnlyDictionary<string, string>

The TXT record properties, keyed case-insensitively.

Type

Gets the service type (e.g. "_companion-link._tcp.local").

public string Type { get; }

Property Value

string

The service type (e.g. "_companion-link._tcp.local").