Class ServiceProfile
Defines a specific service that can be discovered.
Inherited Members
Namespace: Makaretu.Dns
Assembly: Makaretu.Dns.Multicast.dll
Syntax
public class ServiceProfile
Constructors
| Improve this Doc View SourceServiceProfile()
Creates a new instance of the ServiceProfile class.
Declaration
public ServiceProfile()
Remarks
All details must be filled in by the caller, especially the Resources.
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 SourceDomain
The top level domain (TLD) name of the service.
Declaration
public DomainName Domain { get; }
Property Value
Type | Description |
---|---|
DomainName | Always "local". |
FullyQualifiedName
The instance name, service name and domain.
Declaration
public DomainName FullyQualifiedName { get; }
Property Value
Type | Description |
---|---|
DomainName | InstanceName.ServiceName.Domain |
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.
InstanceName
A unique identifier for the service instance.
Declaration
public DomainName InstanceName { get; set; }
Property Value
Type | Description |
---|---|
DomainName | Some unique value. |
QualifiedServiceName
The service name and domain.
Declaration
public DomainName QualifiedServiceName { get; }
Property Value
Type | Description |
---|---|
DomainName | Typically of the form "_service._tcp.local". |
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.
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).
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
Methods
| Improve this Doc View SourceAddProperty(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. |