class XMPP::Stanza::IQ

Overview

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

Included Modules

Defined in:

xmpp/stanza/iq.cr

Constructors

Class Method Summary

Instance Method Summary

Instance methods inherited from module XMPP::Stanza::Attrs

attr_hash attr_hash, from : String from, from=(from : String) from=, id : String id, id=(id : String) id=, lang : String lang, lang=(lang : String) lang=, load_attrs(node : XML::Node) load_attrs, to : String to, to=(to : String) to=, type : String type, type=(type : String) type=, xmlns : String xmlns

Instance methods inherited from module XMPP::Stanza::Packet

name : String name, to_xml(xml : XML::Builder)
to_xml : String
to_xml

Instance methods inherited from module XMPP::Stanza::Packet

name : String name, to_xml(xml : XML::Builder)
to_xml : String
to_xml

Constructor Detail

def self.new(xml : String) #

[View source]
def self.new(node : XML::Node) #

[View source]

Class Method Detail

def self.xml_name : String #

[View source]

Instance Method Detail

def any : Node | Nil #

Any is used to decode unknown payloads


[View source]
def any=(any : Node | Nil) #

Any is used to decode unknown payloads


[View source]
def disco_info #

disco_info builds a default DiscoInfo payload


[View source]
def disco_items #

disco_items builds a default DiscoItems payload


[View source]
def error : Error | Nil #

[View source]
def error=(error : Error | Nil) #

[View source]
def make_error(err : Error) #

[View source]
def name : String #

[View source]
def 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."


[View source]
def 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."


[View source]
def to_xml(elem : XML::Builder) #

[View source]
def version #

Version builds a default software version payload


[View source]