How a server on the local network is found: the host says so every two seconds on a
UDP port — port/0, the :beacon_port in the :cauldron_2d config, 2299 unless
set — to the broadcast address and to this machine, and whoever listens
(Cauldron2D.Beacon.Listener) hears it.
{:ok, beacon} = Cauldron2D.Beacon.start_link(game: :my_game, host: "arcade", http: "http://192.168.1.5:2280", node: :"my_game@arcade")A call is one line, cauldron 1 <game> <host> <http url or -> <node or ->. A node is
joined with its cookie, which the host shows and the caller types; it never goes over
the air.
Summary
Functions
Returns a specification to start this module under a supervisor.
The line a host calls with.
A call heard, or :error for anything else.
The UDP port the calls go out on: config :cauldron_2d, beacon_port: n, else 2299.
Start calling; :game the game's name, :host the name to call as, :http the web URL or nil, :node the node name or nil, :port the UDP port (default port/0).
Types
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
The line a host calls with.
A call heard, or :error for anything else.
@spec port() :: pos_integer()
The UDP port the calls go out on: config :cauldron_2d, beacon_port: n, else 2299.
@spec start_link(keyword()) :: GenServer.on_start()
Start calling; :game the game's name, :host the name to call as, :http the web URL or nil, :node the node name or nil, :port the UDP port (default port/0).