gossip v0.4.1 Gossip.Client behaviour View Source
Behaviour for integrating Gossip into your game
Link to this section Summary
Callbacks
Get the channels you want to subscribe to on start
A new message was received from Gossip on a channel
A player has signed in
A player has signed out
Get the current names of connected players
Player status update
New tell received
Get the game’s User Agent
Link to this section Types
Link to this section Callbacks
Get the channels you want to subscribe to on start
A new message was received from Gossip on a channel
Link to this callback
player_sign_in(game_name, player_name)
View Source
player_sign_in(game_name(), player_name()) :: :ok
A player has signed in
Link to this callback
player_sign_out(game_name, player_name)
View Source
player_sign_out(game_name(), player_name()) :: :ok
A player has signed out
Get the current names of connected players
Link to this callback
players_status(game_name, list)
View Source
players_status(game_name(), [player_name()]) :: :ok
Player status update
Link to this callback
tell_received(game_name, from_player, to_player, message)
View Source
tell_received( game_name(), from_player :: player_name(), to_player :: player_name(), message() ) :: :ok
New tell received
Get the game’s User Agent.
This should return the game name with a version number.