module documentation
(source)

XMPP XML Streams

Building blocks for setting up XML Streams, including helping classes for doing authentication on either client or server side, and working with XML Stanzas.

Class ​Authenticator Base class for business logic of initializing an XmlStream
Class ​Base​Feature​Initiating​Initializer Base class for initializers with a stream feature.
Class ​Connect​Authenticator Authenticator for initiating entities.
Class ​Feature​Not​Advertized Exception indicating a stream feature was not advertized, while required by the initiating entity.
Class IQ Wrapper for an iq stanza.
Class ​Listen​Authenticator Authenticator for receiving entities.
Class ​Stream​Manager Business logic representing a managed XMPP connection.
Class ​Timeout​Error Exception raised when no IQ response has been received before the configured timeout.
Class ​TLSError TLS base exception.
Class ​TLSFailed Exception indicating failed TLS negotiation
Class ​TLSInitiating​Initializer TLS stream initializer for the initiating entity.
Class ​TLSNot​Supported Exception indicating missing TLS support.
Class ​TLSRequired Exception indicating required TLS negotiation.
Class ​Xml​Stream XMPP XML Stream protocol handler.
Class ​Xml​Stream​Factory Factory for Jabber XmlStream objects as a reconnecting client.
Class ​Xml​Stream​Server​Factory Factory for Jabber XmlStream objects as a server.
Class ​XMPPHandler XMPP protocol handler.
Class ​XMPPHandler​Collection Collection of XMPP subprotocol handlers.
Function hash​Password Create a SHA1-digest string of a session identifier and password.
Function to​Response Create a response stanza from another stanza.
Function upgrade​With​IQResponse​Tracker Enhances an XmlStream for iq response tracking.
Constant INIT​_FAILED​_EVENT Token dispatched by Authenticator when the stream has failed to be initialized
Constant NS​_STREAMS Undocumented
Constant NS​_XMPP​_TLS Undocumented
Constant STREAM​_AUTHD​_EVENT Token dispatched by Authenticator when the stream has been completely initialized
Constant STREAM​_CONNECTED​_EVENT This event signals that the connection has been established.
Constant STREAM​_END​_EVENT This event signals that the connection has been closed.
Constant STREAM​_ERROR​_EVENT This event signals that a parse error occurred.
Constant STREAM​_START​_EVENT This event signals that the root element of the XML Stream has been received. For XMPP, this would be the <stream:stream ...> opening tag.
Variable ​Reset Token to signal that the XML stream has been reset.
Variable ssl Undocumented
def hashPassword(sid, password): (source)
Create a SHA1-digest string of a session identifier and password.
Parameters
sid:unicode.The stream session identifier.
password:unicode.The password to be hashed.
def toResponse(stanza, stanzaType=None): (source)

Create a response stanza from another stanza.

This takes the addressing and id attributes from a stanza to create a (new, empty) response stanza. The addressing attributes are swapped and the id copied. Optionally, the stanza type of the response can be specified.

Parameters
stanza:domish.Elementthe original stanza
stanza​Type:stroptional response stanza type
Returns
domish.Elementthe response stanza.
def upgradeWithIQResponseTracker(xs): (source)

Enhances an XmlStream for iq response tracking.

This makes an XmlStream object provide IIQResponseTracker. When a response is an error iq stanza, the deferred has its errback invoked with a failure that holds a StanzaError that is easier to examine.

INIT_FAILED_EVENT: str. = (source)
Token dispatched by Authenticator when the stream has failed to be initialized
Value
intern('//event/xmpp/initfailed')
NS_STREAMS: str = (source)

Undocumented

Value
'http://etherx.jabber.org/streams'
NS_XMPP_TLS: str = (source)

Undocumented

Value
'urn:ietf:params:xml:ns:xmpp-tls'
STREAM_AUTHD_EVENT: str. = (source)
Token dispatched by Authenticator when the stream has been completely initialized
Value
intern('//event/stream/authd')
STREAM_CONNECTED_EVENT: str. = (source)
This event signals that the connection has been established.
Value
intern('//event/stream/connected')
STREAM_END_EVENT: str. = (source)
This event signals that the connection has been closed.
Value
intern('//event/stream/end')
STREAM_ERROR_EVENT: str. = (source)
This event signals that a parse error occurred.
Value
intern('//event/stream/error')
STREAM_START_EVENT: str. = (source)
This event signals that the root element of the XML Stream has been received. For XMPP, this would be the <stream:stream ...> opening tag.
Value
intern('//event/stream/start')
Reset: Basic object. = (source)
Token to signal that the XML stream has been reset.

Undocumented