ex_slp v0.1.1 ExSlp.Service
Summary
Functions
Connects the 2 erlang nodes using the native Node.connect method.
Takes service_url
parameter which is either a regular node url
or the fully qualified URL returned by ExSlp.Service.discover.
Returns: see Node.connect/1
Cancells the service registration initialized by ExSlp.Service.register command. Takes an optional list of slptool command arhuments. Make sure to call the method before the app termination. The service would remain registered otherwise. Returns:
{ :ok, :resp } in case of success
{ :error, message } otherwise
Sends a lookup multicast/broafcast(depends on the slpd settings,
check net.slp.isBroadcastOnly property) request and returns the
list of the registered exslp
services.
Takes 2 optional keyword list parameters: slptool arguments
and the service options.
For more info on args see ExSlp.Server.register/3.
For more info on opts see ExSlp.Server.register/3.
Returns an array of the refistered service URLs filtering
out the current node authority.
Example:
Given there are 2 nodes one@192.168.0.10 and two@192.168.0.20.
Each registers itself as an exslp service.
For node one the method returns
["service:exslp://two@192.168.0.20,65535"]
For node two the metod returns
["service:exslp://one@192.168.0.10,65535"]
The URLs returned are accepted as service_url
parameter
in ExSlp.Service.connect/1 method
Registers a new SLP service with type exslp
using
the current Node name as the authority.
Takes 2 optional keyword list parameters: slptool arguments
and the service options.
For more info on args see ExSlp.Server.register/3.
For more info on opts see ExSlp.Server.register/3.
Example: given the node name
node@192.168.0.10
the service URL will look like:
service:exslp://node@192.168.0.10.
After being registered the node might be discovered by
service type exslp
.
Make sure to call ExSlp.deregister/3 before the app termination
in order to cancel the registration.
slptool always use net.slp.watchRegistrationPID = false option
to connect slpd.
Returns
{ :ok, resp } in case of success
{ :error, message } otherwise
Checks whether the current node has been registered as a service. Takes 2 optional arguments: a keyword list of slptool arguments and a keyword list of findsrvs command options. Returns true if the authority of the current node has been found in the list of the services
Functions
Connects the 2 erlang nodes using the native Node.connect method.
Takes service_url
parameter which is either a regular node url
or the fully qualified URL returned by ExSlp.Service.discover.
Returns: see Node.connect/1.
Cancells the service registration initialized by ExSlp.Service.register command. Takes an optional list of slptool command arhuments. Make sure to call the method before the app termination. The service would remain registered otherwise. Returns:
{ :ok, :resp } in case of success
{ :error, message } otherwise.
Sends a lookup multicast/broafcast(depends on the slpd settings,
check net.slp.isBroadcastOnly property) request and returns the
list of the registered exslp
services.
Takes 2 optional keyword list parameters: slptool arguments
and the service options.
For more info on args see ExSlp.Server.register/3.
For more info on opts see ExSlp.Server.register/3.
Returns an array of the refistered service URLs filtering
out the current node authority.
Example:
Given there are 2 nodes one@192.168.0.10 and two@192.168.0.20.
Each registers itself as an exslp service.
For node one the method returns
["service:exslp://two@192.168.0.20,65535"]
For node two the metod returns
["service:exslp://one@192.168.0.10,65535"]
The URLs returned are accepted as service_url
parameter
in ExSlp.Service.connect/1 method.
Registers a new SLP service with type exslp
using
the current Node name as the authority.
Takes 2 optional keyword list parameters: slptool arguments
and the service options.
For more info on args see ExSlp.Server.register/3.
For more info on opts see ExSlp.Server.register/3.
Example: given the node name
node@192.168.0.10
the service URL will look like:
service:exslp://node@192.168.0.10.
After being registered the node might be discovered by
service type exslp
.
Make sure to call ExSlp.deregister/3 before the app termination
in order to cancel the registration.
slptool always use net.slp.watchRegistrationPID = false option
to connect slpd.
Returns
{ :ok, resp } in case of success
{ :error, message } otherwise.
Checks whether the current node has been registered as a service. Takes 2 optional arguments: a keyword list of slptool arguments and a keyword list of findsrvs command options. Returns true if the authority of the current node has been found in the list of the services.