Extends
Methods
(async) discover() → {Promise}
Discover other devices in the network
Returns:
- Type
- Promise
onDiscoveredMachine(cb)
Set callback that gets called when the native part discovers a new engine
Parameters:
Name | Type | Description |
---|---|---|
cb |
function |
onUndiscoveredMachine(cb)
Sets callback that gets called when a machine that was discovered sends unpublish message
Parameters:
Name | Type | Description |
---|---|---|
cb |
function |
(async) publish(hostname, port)
Parameters:
Name | Type | Description |
---|---|---|
hostname |
* | |
port |
* |
removeDiscoveredService(ip, port)
Remove a (unreachable) service from the list of discovered services
Parameters:
Name | Type | Description |
---|---|---|
ip |
String | |
port |
Number |
resetDiscovery()
Restarts the discovery of services on the network and republishes if currently publishing (might be used after a disconnect)