Book Image

Practical XMPP

By : Steven Watkin, David Koelle
Book Image

Practical XMPP

By: Steven Watkin, David 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 (16 chapters)
Practical XMPP
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
1
An Introduction to XMPP and Installing Our First Server

<iq/>


The Information Query (IQ) stanza is where the work is done in XMPP. Rather than being used in a fire-and-forget fashion like message stanzas, IQ requests represent a request for information or a request to set some piece of information. Therefore unlike message stanzas, they always return a response, even to inform the requester of an error.

There are two types of IQ requests: The GET request, which is comparable with GET in HTTP; and the SET request, which, as you may have guessed, equates to a POST, PUT, or DELETE in HTTP. The response stanzas come in the form of RESULT or ERROR.

Unlike message or presence stanzas, IQ stanzas also have the requirement of an id attribute, which is a unique identifier that allows the mapping of a response to the original request, since XMPP is asynchronous, and so responses may be returned out of order.

A typical IQ request might be from a client to a server to see what features it supports (like our entity capabilities from before, it works on...