Unifex.CNode (Unifex v0.7.3) View Source

Link to this section Summary

Functions

Wraps Bundlex.CNode functionalities to support Unifex-specific CNode behaviours

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.

Link to this section Types

Specs

on_start_t() :: {:ok, t()} | {:error, :spawn_cnode | :connect_to_cnode}

Specs

t() :: %Unifex.CNode{
  bundlex_cnode: Bundlex.CNode.t(),
  node: node(),
  server: pid()
}

Link to this section Functions

Link to this function

%Unifex.CNode{}

View Source (struct)

Wraps Bundlex.CNode functionalities to support Unifex-specific CNode behaviours

Link to this function

call(c_node, fun_name, args \\ [], timeout \\ 5000)

View Source

Specs

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).

Specs

monitor(t()) :: reference()

Starts monitoring CNode from the calling process.

Link to this macro

start(native_name)

View Source (macro)

Works the same way as start_link/1, but does not link to CNode's associated server.

Specs

start(app :: atom(), native_name :: atom()) :: on_start_t()

Works the same way as start_link/2, but does not link to CNode's associated server.

Link to this macro

start_link(native_name)

View Source (macro)

Spawns and connects to CNode cnode_name.

For details, see Bundlex.CNode.start_link/2.

Link to this function

start_link(app, native_name)

View Source

Specs

start_link(app :: atom(), native_name :: atom()) :: on_start_t()

Spawns and connects to CNode cnode_name from application app.

For details, see Bundlex.CNode.start_link/2.

Specs

stop(t()) :: :ok | {:error, :disconnect_cnode}

Disconnects from CNode.