Channels
A channel is a named room that clients connect to. Everyone on the same channel receives every message sent to it.
Channel Names
Channel names can be any string. Use whatever naming convention makes sense for your app:
connect('chat') // simple name
connect('game/lobby') // slashes for structure
connect('myapp:notifications') // namespaced channelThe colon (:) has special meaning — it separates a namespace prefix from the channel name. See Namespaces for details.
Lifecycle
Channels are ephemeral:
- Created when the first client connects
- Destroyed when the last client disconnects
- No TTL, no keepalives, no persistence
This means channels are completely free to create. You don't need to register or configure them ahead of time — just connect to any name and it exists.
Next: Sending Messages — send strings, objects, typed payloads, and direct messages.