Class DnssdBrowser
Definition
- Assembly:
- Tizen.Network.Nsd.dll
This class is used for managing the network service discovery using DNS-SD.
public class DnssdBrowser : INsdBrowser
- Inheritance
-
objectDnssdBrowser
- Implements
Constructors
View SourceDnssdBrowser(string)
A public constructor for the DnssdBrowser class to create a DnssdBrowser instance for the given service type.
Declaration
public DnssdBrowser(string serviceType)
Parameters
Type | Name | Description |
---|---|---|
string | serviceType | The DNS-SD service type. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Thrown when the serviceType is null. |
System.NotSupportedException | Thrown when DNS-SD is not supported. |
Methods
View SourceStartDiscovery()
Starts browsing the DNS-SD remote service.
Declaration
public void StartDiscovery()
Remarks
If there are any services available, the ServiceFound event will be invoked. The application will keep browsing for the available or unavailable services until it calls StopDiscovery().
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when any other error occurred. |
System.NotSupportedException | Thrown when DNS-SD is not supported. |
System.UnauthorizedAccessException | Thrown when the permission is denied. |
StopDiscovery()
Stops browsing the DNS-SD remote service.
Declaration
public void StopDiscovery()
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown when any other error occurred. |
System.NotSupportedException | Thrown when DNS-SD is not supported. |
Events
View SourceServiceFound
This event is raised when a DNS-SD service is found during the service discovery.
Declaration
public event EventHandler<DnssdServiceFoundEventArgs> ServiceFound
Event Type
Type | Description |
---|---|
System.EventHandler<TEventArgs><DnssdServiceFoundEventArgs> |