class

XMPP::Stanza::IQ

Inherits XMPP::Stanza::Attrs / XMPP::Stanza::Packet / XMPP::Stanza::Extension / XMPP::Stanza::Packet / Reference / Object

IQ Packet

IQ implements RFC 6120 - A.5 Client Namespace (a part) RFC 3920 Section 9.2.3 - IQ Semantics

Info/Query, or IQ, is a request-response mechanism, similar in some ways to HTTP. The semantics of IQ enable an entity to make a request of, and receive a response from, another entity. The data content of the request and response is defined by the namespace declaration of a direct child element of the IQ element, and the interaction is tracked by the requesting entity through use of the 'id' attribute. Thus, IQ interactions follow a common pattern of structured data exchange such as get/result or set/result (although an error may be returned in reply to a request if appropriate).

"ID" Attribute

IQ Stanzas require the ID attribute be set.

"Type" Attribute

  • :get -- The stanza is a request for information or requirements.

  • :set -- The stanza provides required data, sets new values, or replaces existing values.

  • :result -- The stanza is a response to a successful get or set request.

  • :error -- An error has occurred regarding processing or delivery of a previously-sent get or set (see Stanza Errors).

Constructors

new(xml : String)
Source
new(node : XML::Node)
Source

Class methods

xml_name
Source

Instance methods

any

Any is used to decode unknown payloads

Source
any=(any : Node | Nil)

Any is used to decode unknown payloads

Source
disco_info

disco_info builds a default DiscoInfo payload

Source
disco_items

disco_items builds a default DiscoItems payload

Source
error
Source
error=(error : Error | Nil)
Source
make_error(err : Error)
Source
name
Source
payload

We can only have one payload on IQ: "An IQ stanza of type "get" or "set" MUST contain exactly one child element, which specifies the semantics of the particular request."

Source
payload=(payload : IQPayload | Nil)

We can only have one payload on IQ: "An IQ stanza of type "get" or "set" MUST contain exactly one child element, which specifies the semantics of the particular request."

Source
to_xml(xml : XML::Builder)
Source
version

Version builds a default software version payload

Source