Anoma.Node.Transport (Anoma v0.25.0)

Summary

Types

Shorthand type for socket.

Shorthand type for port number.

Functions

Given a remote node id, I start a proxy engine that represents that remote node.

I start a new TCP client connection to a given host and port.

I start a new TCP server for the given node.

Types

@type hostname() :: :inet.socket_address() | :inet.hostname()

Shorthand type for socket.

Link to this type

port_number()

@type port_number() :: :inet.port_number()

Shorthand type for port number.

Functions

Link to this function

start_engine_proxy(node_id, remote_node_id, type)

@spec start_engine_proxy(String.t(), String.t(), atom()) ::
  {:ok, pid()} | {:error, term()}

Given a remote node id, I start a proxy engine that represents that remote node.

Link to this function

start_tcp_client(node_id, arg)

@spec start_tcp_client(
  String.t(),
  {hostname(), port_number()}
) :: {:ok, pid(), port_number()} | {:error, term()}

I start a new TCP client connection to a given host and port.

Link to this function

start_tcp_server(node_id, arg \\ {{0, 0, 0, 0}, 0})

@spec start_tcp_server(
  String.t(),
  {hostname(), port_number()}
) :: {:ok, pid(), port_number()} | {:error, term()}

I start a new TCP server for the given node.