Table of Contents

Class ServiceParser

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

Parses zeroconf/DNS-SD services from records collected across DNS messages.

public sealed class ServiceParser
Inheritance
ServiceParser
Inherited Members

Fields

DEVICE_INFO_SERVICE

The DNS-SD device-info service type.

public const string DEVICE_INFO_SERVICE = "_device-info._tcp.local"

Field Value

string

Methods

AddMessage(DnsMessage)

Adds a message with records to parse.

public ServiceParser AddMessage(DnsMessage message)

Parameters

message DnsMessage

The DNS message whose answers and additional resources should be added.

Returns

ServiceParser

This instance, for chaining.

DecodeValue(byte[])

Decodes a bytes value, converting non-breaking-spaces to spaces before decoding.

public static string DecodeValue(byte[] value)

Parameters

value byte[]

The raw TXT record value.

Returns

string

The decoded string.

Parse()

Parses previously added records and returns the discovered services.

public IReadOnlyList<Service> Parse()

Returns

IReadOnlyList<Service>

The parsed services.