Channels
Introduction
All messages are routed through channels, and channel topics are where clients subscribe to listen for new messages. Channels define 3 public methods that can be used:
handle_joined
- Called when a user joins a channel.handle_message
- Called when a user sends a message to a channel. A common message handler will simply rebroadcast the message to the other subscribers withrebroadcast!
method.handle_leave
- Called when a user leaves the channel.
Example Usage
A channel can be generated by calling maze g channel ChatRoomChannel
Last updated