Book Image

Practical XMPP

By : Lloyd Watkin, Steven Watkin, Koelle
Book Image

Practical XMPP

By: Lloyd Watkin, Steven Watkin, Koelle

Overview of this book

XMPP (eXtensible Messaging and Presence Protocol) is a messaging protocol that enables communication between two or more devices via the Internet. With this book, developers will learn about the fundamentals of XMPP, be able to work with the core functionality both server-side and in the browser, as well as starting to explore several of the protocol extensions. You will not only have a solid grasp of XMPP and how it works, but will also be able to use the protocol to build real-world applications that utilize the power of XMPP. By the end of this book, you will know more about networking applications in general, and have a good understanding of how to extend XMPP, as well as using it in sample applications.
Table of Contents (11 chapters)
Free Chapter
1
1. An Introduction to XMPP and Installing Our First Server

Discovery


As with all other parts of XMPP, if we want to discover and find information about a pubsub provider, we use our old friend (by now, right?) DISCO. Pubsub systems will often sit on their own domain under an XMPP server domain (often running as a component; more on that in the next chapter).

To discover a pubsub system, Marty would run a DISCO#items query against the parent domain and see what was available:

<iq type='get' id='query1' 
from='[email protected]/street' 
to='hill.valley'> 
  <query xmlns='http://jabber.org/protocol/disco#items'/> 
</iq> 

The server then responds with a set of items that it's hosting:

<iq type='result' id='query1' 
from='hill.valley' 
to='[email protected]/street'> 
  <query xmlns='http://jabber.org/protocol/disco#items> 
    <item jid='pubsub.hill.valley'/> 
    <item jid='chat.hill.valley'/> 
    <item jid='identity.hill.valley'/> 
  </query&gt...