kalevala v0.1.0 Kalevala.Communication behaviour View Source

Handle communication for the game

Register global channels, room channels, character channels, etc.

Link to this section Summary

Link to this section Functions

Link to this function

publish(channel_ets_key, channel_name, event, options)

View Source

Publish a message on a channel

Link to this function

register(pid, channel_name, callback_module, options)

View Source

Register a new channel with a callback

Link to this function

subscribe(channel_ets_key, channel_name, subscriber_pid, options)

View Source

Subscribe the current PID to a channel

Link to this function

unsubscribe(channel_ets_key, channel_name, subscriber_pid, options)

View Source

Unsubscribe the current PID to a channel

Link to this section Callbacks

Link to this callback

initial_channels()

View Source
initial_channels() :: []