Rooms is a bit out of scope. I agree it could use some more
documentation though.
The basic idea is that when your process connects its pid is added to a
list somewhere (gproc, gen_server, anything else). When a message is
sent to the room, all pids in the list receive it. You can also
broadcast when someone enters or leave the room. And you remove the pid
from the list when it's gone (using monitors for example).