gossip v0.3.0 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 out

Get the current names of connected players

Get the game’s User Agent

Link to this section Types

Link to this type channel_name() View Source
channel_name() :: String.t()
Link to this type game_name() View Source
game_name() :: String.t()
Link to this type player_name() View Source
player_name() :: String.t()
Link to this type user_agent() View Source
user_agent() :: String.t()

Link to this section Callbacks

Get the channels you want to subscribe to on start

Link to this callback message_broadcast(message) View Source
message_broadcast(message()) :: :ok

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 user_agent() View Source
user_agent() :: user_agent()

Get the game’s User Agent.

This should return the game name with a version number.