View Source Unifex.CNode (Unifex v1.2.1)
Wraps Bundlex.CNode functionalities to support Unifex-specific CNode behaviours
Summary
Functions
Makes a synchronous call to CNode and waits for its reply.
Starts monitoring CNode from the calling process.
Works the same way as start_link/1, but does not link to CNode's associated
server.
Works the same way as start_link/2, but does not link to CNode's associated
server.
Spawns and connects to CNode cnode_name.
Spawns and connects to CNode cnode_name from application app.
Disconnects from CNode.
Types
@type on_start_t() :: {:ok, t()} | {:error, :spawn_cnode | :connect_to_cnode}
@type t() :: %Unifex.CNode{ bundlex_cnode: Bundlex.CNode.t(), node: node(), server: pid() }
Functions
@spec call( t(), fun_name :: atom(), args :: list(), timeout :: non_neg_integer() | :infinity ) :: response :: term()
Makes a synchronous call to CNode and waits for its reply.
If the response doesn't come in within timeout, error is raised.
Messages are exchanged directly (without interacting with CNode's associated
server).
Starts monitoring CNode from the calling process.
Works the same way as start_link/1, but does not link to CNode's associated
server.
@spec start(app :: Application.app(), Unifex.Specs.native_name_t()) :: on_start_t()
Works the same way as start_link/2, but does not link to CNode's associated
server.
Spawns and connects to CNode cnode_name.
For details, see Bundlex.CNode.start_link/2.
@spec start_link(app :: Application.app(), Unifex.Specs.native_name_t()) :: on_start_t()
Spawns and connects to CNode cnode_name from application app.
For details, see Bundlex.CNode.start_link/2.
@spec stop(t()) :: :ok | {:error, :disconnect_cnode}
Disconnects from CNode.