Show / Hide Table of Contents

Class ServiceProfile

Defines a specific service that can be discovered.

Inheritance
Object
ServiceProfile
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Makaretu.Dns
Assembly: Makaretu.Dns.Multicast.dll
Syntax
public class ServiceProfile

Constructors

| Improve this Doc View Source

ServiceProfile()

Creates a new instance of the ServiceProfile class.

Declaration
public ServiceProfile()
Remarks

All details must be filled in by the caller, especially the Resources.

| Improve this Doc View Source

ServiceProfile(DomainName, DomainName, UInt16, IEnumerable<IPAddress>)

Creates a new instance of the ServiceProfile class with the specified details.

Declaration
public ServiceProfile(DomainName instanceName, DomainName serviceName, ushort port, IEnumerable<IPAddress> addresses = null)
Parameters
Type Name Description
DomainName instanceName

A unique identifier for the specific service instance.

DomainName serviceName

The ServiceName of the service.

UInt16 port

The TCP/UDP port of the service.

IEnumerable<IPAddress> addresses

The IP addresses of the specific service instance. If null then GetIPAddresses() is used.

Remarks

The SRV, TXT and A/AAAA resoruce records are added to the Resources.

Properties

| Improve this Doc View Source

Domain

The top level domain (TLD) name of the service.

Declaration
public DomainName Domain { get; }
Property Value
Type Description
DomainName

Always "local".

| Improve this Doc View Source

FullyQualifiedName

The instance name, service name and domain.

Declaration
public DomainName FullyQualifiedName { get; }
Property Value
Type Description
DomainName InstanceName.ServiceName.Domain
| Improve this Doc View Source

HostName

The fully qualified name of the instance's host.

Declaration
public DomainName HostName { get; set; }
Property Value
Type Description
DomainName
Remarks

This can be used to query the address records (A and AAAA) of the service instance.

| Improve this Doc View Source

InstanceName

A unique identifier for the service instance.

Declaration
public DomainName InstanceName { get; set; }
Property Value
Type Description
DomainName

Some unique value.

| Improve this Doc View Source

QualifiedServiceName

The service name and domain.

Declaration
public DomainName QualifiedServiceName { get; }
Property Value
Type Description
DomainName

Typically of the form "_service._tcp.local".

| Improve this Doc View Source

Resources

DNS resource records that are used to locate the service instance.

Declaration
public List<ResourceRecord> Resources { get; set; }
Property Value
Type Description
List<ResourceRecord>

More infomation about the service.

Remarks

All records should have the Name equal to the FullyQualifiedName or the HostName.

At a minimum the SRVRecord and TXTRecord records must be present. Typically AddressRecord are also present and are associaed with HostName.

| Improve this Doc View Source

ServiceName

A unique name for the service.

Declaration
public DomainName ServiceName { get; set; }
Property Value
Type Description
DomainName

Typically of the form "_service._tcp".

Remarks

It consists of a pair of DNS labels, following the SRV records convention. The first label of the pair is an underscore character (_) followed by the service name. The second label is either "_tcp" (for application protocols that run over TCP) or "_udp" (for all others).

| Improve this Doc View Source

Subtypes

A list of service features implemented by the service instance.

Declaration
public List<string> Subtypes { get; set; }
Property Value
Type Description
List<String>

The default is an empty list.

See Also
https://tools.ietf.org/html/rfc6763#section-7.1

Methods

| Improve this Doc View Source

AddProperty(String, String)

Add a property of the service to the TXTRecord.

Declaration
public void AddProperty(string key, string value)
Parameters
Type Name Description
String key

The name of the property.

String value

The value of the property.

See Also

Advertise(ServiceProfile)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX