Namespaces
Without a namespace, anyone can create any channel — it's the Wild West. A namespace lets you reserve a prefix and control every channel under it.
Boundaries
Both : and / act as boundaries.
If you reserve myapp, you control myapp itself
and anything after a boundary — myapp/chat, myapp:feed, etc.
Boundaries also work inside a namespace.
You can register myapp/private as a separate namespace with its own keys.
The most specific match always wins.
Matching
When a client connects, the server finds the longest matching namespace. Given myapp and myapp/private are both registered:
| Channel | Match | Why |
|---|---|---|
myapp | myapp | Exact match |
myapp/chat | myapp | / boundary |
myapp:chat | myapp | : boundary |
myapp/private | myapp/private | Exact match (more specific) |
myapp/private/room1 | myapp/private | / boundary after longer match |
myapp/privateer | myapp | No boundary after private |
myapps:chat | none | No boundary after myapp |
random-room | none | Open channel — no namespace |
This matching is powered by a character-level trie for O(k) lookup, where k is the channel name length. It's extremely fast.
Protection
Only you can register namespaces under your prefix.
If you own myapp, no one else can claim myapp/anything or myapp:anything.
Even a namespace with no keys set still protects your channels. Without a reservation, the first person to connect can set their own ephemeral keys (see Access Control). With a reservation, this is blocked — only your configured keys apply.
Reserving a Namespace
Sign in with GitHub, then go to Reservations to reserve a namespace.
Each account gets up to 5 namespace reservations, each with their own join keys and send keys.
See Access Control for details.
Next: Access Control — set join and send keys to control who can do what.