ZeroConfRegistration

Overview

The ZeroConfRegistration class provides methods for service registration in ZeroConf service providers.

Use Case

This class can be used in a client application to register services within ZeroConf service provider. To start using this class perform the following steps:

  • Create an instance of the ZeroConfRegistration class and connect it to the ServerChannel instance (only one channel per ZeroConfRegistration instance can be used).
  • Add a the ZeroConfServiceTypeAttribute attribute to the service implementation class, as shown below:
[RemObjects.SDK.Server.ZeroConfServiceType("BonjourDiscoverableService")]
public class BonjourDiscoverableService : RemObjects.SDK.Server.Service, IBonjourDiscoverableService
...

Note: Take a look at the Bonjour Discovery Sample (.NET) shipped with the Remoting SDK to see service discovery in action.

Location


 

constructor

Creates a new instance of the ZeroConfRegistration class.

 

constructor

 

ZeroConfRegistration()

 

Sub New()

Domain

Gets or sets the service domain name.

Currently only the '.local' domain is supported.

 

property Domain: String read write;

 

String Domain { get; set; }

 

Property Domain() As String

IsRegistrationFailed

Indicates whether an error occurred while registering the service.

 

property IsRegistrationFailed: Boolean read;

 

Boolean IsRegistrationFailed { get; }

 

ReadOnly Property IsRegistrationFailed() As Boolean

RegistrationFailed

This event is raised when the ZeroConfRegistration class experiences an error while trying to register your service. The ZeroConfRegistrationErrorArgs property can be used to access the underlying exception object.

 

event RegistrationFailed: EventHandler<ZeroConfRegistrationErrorEventArgs>;

 

delegate EventHandler<ZeroConfRegistrationErrorEventArgs> RegistrationFailed()

 

Event RegistrationFailed As EventHandler<ZeroConfRegistrationErrorEventArgs>

RegistrationSucceeded

This event is raised when the service registration procedure completes successfully.

 

event RegistrationSucceeded: EventHandler;

 

delegate EventHandler RegistrationSucceeded()

 

Event RegistrationSucceeded As EventHandler

ServerChannel

Gets or sets a reference to the server channel instance that will be available for discovery.

Note: Because services are published for a specific host and port, you can only publish one server channel per ZeroConfRegistration instance. If you wish to make more than one channel discoverable, you have to add additional ZeroConfRegistration components.

 

property ServerChannel: IServerChannel read write;

 

IServerChannel ServerChannel { get; set; }

 

Property ServerChannel() As IServerChannel

ServerName

Gets or sets the name of the server.

 

property ServerName: String read write;

 

String ServerName { get; set; }

 

Property ServerName() As String

 

Domain

Gets or sets the service domain name.

Currently only the '.local' domain is supported.

 

property Domain: String read write;

 

String Domain { get; set; }

 

Property Domain() As String

IsRegistrationFailed

Indicates whether an error occurred while registering the service.

 

property IsRegistrationFailed: Boolean read;

 

Boolean IsRegistrationFailed { get; }

 

ReadOnly Property IsRegistrationFailed() As Boolean

ServerChannel

Gets or sets a reference to the server channel instance that will be available for discovery.

Note: Because services are published for a specific host and port, you can only publish one server channel per ZeroConfRegistration instance. If you wish to make more than one channel discoverable, you have to add additional ZeroConfRegistration components.

 

property ServerChannel: IServerChannel read write;

 

IServerChannel ServerChannel { get; set; }

 

Property ServerChannel() As IServerChannel

ServerName

Gets or sets the name of the server.

 

property ServerName: String read write;

 

String ServerName { get; set; }

 

Property ServerName() As String

 

constructor

Creates a new instance of the ZeroConfRegistration class.

 

constructor

 

ZeroConfRegistration()

 

Sub New()

 

RegistrationFailed

This event is raised when the ZeroConfRegistration class experiences an error while trying to register your service. The ZeroConfRegistrationErrorArgs property can be used to access the underlying exception object.

 

event RegistrationFailed: EventHandler<ZeroConfRegistrationErrorEventArgs>;

 

delegate EventHandler<ZeroConfRegistrationErrorEventArgs> RegistrationFailed()

 

Event RegistrationFailed As EventHandler<ZeroConfRegistrationErrorEventArgs>

RegistrationSucceeded

This event is raised when the service registration procedure completes successfully.

 

event RegistrationSucceeded: EventHandler;

 

delegate EventHandler RegistrationSucceeded()

 

Event RegistrationSucceeded As EventHandler