Skip to content
Presence & ProtocolAn independent guide to Jabber and XMPP

Layer 01 · Protocol

The protocol: streams, stanzas and addresses

How an XMPP session is opened, what the three stanza types do, and how a JID names a user, a server and a resource.

A printed protocol specification open on a desk, passages underlined in pencil.

XMPP is a way of keeping an XML stream open between two parties and pushing small, well formed pieces of XML down it. Everything else, chat, presence, file transfer, group rooms, is built from three of those pieces and from an addressing scheme that names a person, the server that holds their account, and the particular device they are using right now. This layer covers those foundations, and it is the layer the rest of the site keeps pointing back to.

In this layer

  1. Three brass letter slots of different sizes set into a dark painted wall, photographed straight on.

    Message, presence and IQ: the three stanzas

    Everything an XMPP client does is built from three XML elements. Knowing which one carries what explains most of the rest.

  2. A green painted front door seen close up, with a brass letter slot, a bell push and a worn handle.

    How a JID is built, and what breaks it

    An XMPP address looks like an email address and is not one. The differences are written down, and they matter.

  3. A hand ticking names on a printed contact list, several rows already marked, desk lamp lit.

    Presence, rosters and the subscription dance

    Presence is not a status message. It is a routing decision the server makes on your behalf, from a list you own.

Every essay in this layer is written against the reference page on the three stanza types, and two neighbouring layers extend it: History and Servers.