O'Reilly logo

Mastering Internet of Things by Peter Waher

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

Understanding stanzas

An XMPP client sends XML fragments on its XMPP connection. The root elements of these fragments are called stanzas. There are three basic types of stanzas, each one corresponding to one of the three basic communication patterns available: asynchronous message (message), request/respond (iq, short for Information Query), and Publish/Subscribe (presence).

XMPP has a second Publish/Subscribe mechanism as well, which is defined in XEP-0060.

There are five common attributes each stanza can have, most of which are optional at one stage or another:

Attribute

Meaning

id

It's possible to assign an identity to the stanza. This identity can be used in references. Typical use is in the request/response pattern. But it ...

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