O'Reilly logo

Practical XMPP by David Koelle, Lloyd Watkin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Joining a room

Let's take the example of Biff Tannen (biff@tannen.hello) and his gang hanging out at Lou's café, which we'll refer to as gang@lous.cafe.

Notice that a chat room address looks just like a JID! The MUC room itself will sit on a domain handled by an XMPP server and the local part becomes the identifier of the room itself, in this case, gang. This means that an MUC room is just a JID that you can talk to.

Now, joining a non-password-protected room is simple: no, wait! It's really simple. In essence, all we do is send a directed Presence (remember that from Chapter 2, Diving into the Core XMPP Concepts?) to the room we want to join with a chosen nickname (more on that later) and, provided it is not taken, we're in!

Let's say Marty turns ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required