View Source ExSTARS (ExSTARS v0.1.3)

Documentation for ExSTARS.

Summary

Functions

Send a message.

Send a message using the specified client.

Functions

@spec send(message :: String.t()) :: :ok | {:error, :send_failed}

Send a message.

Example

iex> ExSTARS.send("term1 stars")
:ok
iex> ExSTARS.send("System help")
:ok
@spec send(name :: String.t(), message :: String.t()) :: :ok | {:error, :send_failed}

Send a message using the specified client.

Example

iex> ExSTARS.send("term1", "System help")
:ok
Link to this function

start_client(address, port, callback_pid \\ self())

View Source
@spec start_client(
  address :: :inet.socket_address() | :inet.hostname(),
  port :: :inet.port_number(),
  callback_pid :: pid()
) :: :ok | {:error, :already_started}

Start STARS client.

Example

iex> ExSTARS.start_client({127, 0, 0, 1}, 6057)
:ok
Link to this function

start_client(name, key, address, port, callback_pid \\ self())

View Source
@spec start_client(
  name :: String.t(),
  key :: String.t(),
  address :: :inet.socket_address() | :inet.hostname(),
  port :: :inet.port_number(),
  callback_pid :: pid()
) :: :ok | {:error, :already_started}

Start STARS client.

Example

iex> ExSTARS.start_client("term1", "stars", {127, 0, 0, 1}, 6057)
:ok