Module: fathom/tools/remoteapi

Fathom remote API implementation. Includes discovery and API server(s) and client functions. Implemented on top of the JSONRPC protocol using multicast for discovery, udp for the API calls. To use these methods you do not have to list the underlying APIs or particular destinations in the manifest, they are allowed implicitely when requesting the tools.remoteapi.* functionality.
Source:

Methods

(private, static) discovery(callback, timeout)

Discover other nodes running Fathom (i.e. nodes that have called remoteapi.start).
Parameters:
Name Type Description
callback function Result callback.
timeout int Timeout (seconds).
Source:

(private, static) makereq(callback, node, method, params)

Make remote API requests to other nodes running Fathom.
Parameters:
Name Type Description
callback function Result callback.
node Object The target Fathom node as returned by the discovery.
method string The Fathom API method to call (all API methods available subject to the page manifest).
params Array The parameters for the API call.
Source:

(private, static) start()

Start remote API servers (sets the browser visible to other Fathoms and serves incoming RPC calls). Does nothing if API is already enabled.
Source:

(private, static) stop()

Stop remote API servers (unless somebody else is using it).
Source: