t.w.p.j.xmlstream : module documentation

Part of twisted.words.protocols.jabber View 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.

Function hashPassword Create a SHA1-digest string of a session identifier and password.
Class Authenticator Base class for business logic of initializing an XmlStream
Class ConnectAuthenticator Authenticator for initiating entities.
Class ListenAuthenticator Authenticator for receiving entities.
Class FeatureNotAdvertized Exception indicating a stream feature was not advertized, while required by the initiating entity.
Class BaseFeatureInitiatingInitializer Base class for initializers with a stream feature.
Class TLSError TLS base exception.
Class TLSFailed Exception indicating failed TLS negotiation
Class TLSRequired Exception indicating required TLS negotiation.
Class TLSNotSupported Exception indicating missing TLS support.
Class TLSInitiatingInitializer TLS stream initializer for the initiating entity.
Class XmlStream XMPP XML Stream protocol handler.
Class XmlStreamFactory Factory for Jabber XmlStream objects as a reconnecting client.
Class XmlStreamServerFactory Factory for Jabber XmlStream objects as a server.
Class TimeoutError Exception raised when no IQ response has been received before the configured timeout.
Function upgradeWithIQResponseTracker Enhances an XmlStream for iq response tracking.
Class IQ Wrapper for an iq stanza.
Function toResponse Create a response stanza from another stanza.
Class XMPPHandler XMPP protocol handler.
Class XMPPHandlerCollection Collection of XMPP subprotocol handlers.
Class StreamManager Business logic representing a managed XMPP connection.
def hashPassword(sid, password): (source)
Create a SHA1-digest string of a session identifier and password.
ParameterssidThe stream session identifier. (type: unicode.)
passwordThe password to be hashed. (type: unicode.)
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 StanzaException that is easier to examine.

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.

Parametersstanzathe original stanza (type: domish.Element)
stanzaTypeoptional response stanza type (type: str)
Returnsthe response stanza. (type: domish.Element)
API Documentation for Twisted, generated by pydoctor at 2013-11-18 18:11:01.