View Source Hangman.Engine.GameServer (Hangman Engine v0.1.53)

A server process that holds a game struct as its state. Times out after 30 minutes of inactivity.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Callback implementation for GenServer.init/1.

Spawns a game server process to be registered via game_name.

Allows to register or look up a game server process via game_name.

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

@spec init(Hangman.Game.name()) :: {:ok, Hangman.Game.t(), timeout()}

Callback implementation for GenServer.init/1.

@spec start_link(Hangman.Game.name()) :: GenServer.on_start()

Spawns a game server process to be registered via game_name.

@spec via(Hangman.Game.name()) :: {:global, tuple()}

Allows to register or look up a game server process via game_name.