Home | Trees | Index | Help |
|
---|
Package pyxmpp :: Module stream :: Class Stream |
|
StanzaProcessor
--+ |StreamHandler
--+ |StreamBase
--+ |PasswordManager
--+ | | |StreamSASLMixIn
--+ |StreamTLSMixIn
--+ | Stream
ClientStream
,
ComponentStream
Generic XMPP stream class. Responsible for establishing connection, parsing the stream, StartTLS encryption and SASL authentication negotiation and usage, dispatching received stanzas to apopriate handlers and sending application's stanzas. Whenever we say "stream" here we actually mean two streams (incoming and outgoing) of one connections, as defined by the XMPP specification. :Ivariables: - `lock`: RLock object used to synchronize access to Stream object. - `features`: stream features as annouced by the initiator. - `me`: local stream endpoint JID. - `peer`: remote stream endpoint JID. - `process_all_stanzas`: when `True` then all stanzas received are considered local. - `tls`: TLS connection object. - `initiator`: `True` if local stream endpoint is the initiating entity. - `_reader`: the stream reader object (push parser) for the stream.
Method Summary | |
---|---|
Initialize Stream object :Parameters: - `default_ns`: stream's default namespace ("jabber:client" for client, "jabber:server" for server, etc.) - `extra_ns`: sequence of extra namespace URIs to be defined for the stream. | |
Inherited from StreamTLSMixIn | |
Get the TLS connection object for the stream. | |
Inherited from PasswordManager | |
Check if the authenticated entity is allowed to use given authorization id. | |
Check the password validity. | |
Choose an authentication realm from the list provided by the server. | |
Generate a random string for digest authentication challenges. | |
Get the password for user authentication. | |
Get available realms list. | |
Return the host name for DIGEST-MD5 'digest-uri' field. | |
Return the service name for DIGEST-MD5 'digest-uri' field. | |
Return the service type for DIGEST-MD5 'digest-uri' field. | |
Inherited from StreamBase | |
| |
Accept incoming connection. | |
Bind to a resource. | |
Check "to" attribute of received stream header. | |
Forcibly close the connection and clear the stream state. | |
Establish XMPP connection with given address. | |
Check if stream is connected. | |
Gracefully close the connection. | |
Handle stream XML parse error. | |
Return filedescriptor of the stream socket. | |
Generate a random and unique stream ID. | |
Do some housekeeping (cache expiration, timeout handling). | |
Simple "main loop" for the stream. | |
Single iteration of a simple "main loop" for the stream. | |
Process stream's pending events. | |
Process stream error element received. | |
Write stanza to the stream. | |
Process stanza (first level child element of the stream). | |
Process stanza (first level child element of the stream) start tag -- do nothing. | |
Called when connection state is changed. | |
Process </stream:stream> (stream end) tag received from peer. | |
Process <stream:stream> (stream start) tag received from peer. | |
Write raw data to the stream socket. | |
Inherited from StanzaProcessor | |
Modify incoming stanza before processing it. | |
Modify outgoing stanza before sending into the stream. | |
Process IQ stanza received. | |
Process message stanza. | |
Process presence stanza. | |
Process stanza received from the stream. | |
Process stanza not addressed to us. | |
Set <iq type="get"/> handler. | |
Set <iq type="set"/> handler. | |
Set a handler for <message/> stanzas. | |
Set a handler for <presence/> stanzas. | |
Set response handler for an IQ "get" or "set" stanza. | |
Remove <iq type="get"/> handler. | |
Remove <iq type="set"/> handler. |
Method Details |
---|
__init__(self,
default_ns,
extra_ns=(),
sasl_mechanisms=(),
tls_settings=None,
keepalive=0)
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Wed May 31 22:36:58 2006 | http://epydoc.sf.net |