View Source Islands.Engine.GameServer (Islands Engine v0.2.63)

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

Summary

Functions

Returns a specification to start this module under a supervisor.

Callback implementation for GenServer.init/1.

Takes a backup of game and returns it.

Spawns a game server process to be registered via a game name.

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

Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Callback implementation for GenServer.init/1.

@spec save(Islands.Game.t()) :: Islands.Game.t()

Takes a backup of game and returns it.

Spawns a game server process to be registered via a game name.

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

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