Hears the servers of one game calling on the local network (Cauldron2D.Beacon) and
keeps those heard in the last six seconds.
{:ok, _} = Cauldron2D.Beacon.Listener.start_link(game: :my_game)
Cauldron2D.Beacon.Listener.found()Options
:game— the game whose servers to keep; others' calls are ignored. Required:port— the UDP port. DefaultCauldron2D.Beacon.port/0:name— the process name. Default the module,nilfor none
A port it cannot open leaves it deaf, hearing nothing.
Summary
Functions
Returns a specification to start this module under a supervisor.
The servers heard in the last six seconds, the latest first.
Start listening; see the module documentation for the options.
Types
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec found(GenServer.server()) :: [server()]
The servers heard in the last six seconds, the latest first.
@spec start_link(keyword()) :: GenServer.on_start()
Start listening; see the module documentation for the options.