Web sockets are initiated by the browser and are one-to-one communication. The chat example uses a ChatRoom object to send events to all the connected web sockets. Check out
the manual for a simpler example of WebSockets: the echo server is echoing each browser separately, no broadcast involved.
If you want to customize the chat example, you should modify the ChatRoom class. For example, you could modify ChatRoom.get( ) to accept a roomName parameter and return or create the appropriate ChatRoom object.