Package xmpp :: Module client :: Class Component
[hide private]
[frames] | no frames]

Class Component

source code


Component class. The only difference from CommonClient is ability to perform component authentication.

Instance Methods [hide private]
 
__init__(self, transport, port=5347, typ=None, debug=['always', 'nodebuilder'], domains=None, sasl=0, bind=0, route=0, xcp=0)
Init function for Components.
source code
 
connect(self, server=None, proxy=None)
This will connect to the server, and if the features tag is found then set the namespace to be jabber:client as that is required for jabberd2.
source code
 
dobind(self, sasl) source code
 
auth(self, name, password, dup=None)
Authenticate component "name" with password "password".
source code

Inherited from CommonClient: DisconnectHandler, RegisterDisconnectHandler, UnregisterDisconnectHandler, disconnected, event, isConnected, reconnectAndReauth

Method Details [hide private]

__init__(self, transport, port=5347, typ=None, debug=['always', 'nodebuilder'], domains=None, sasl=0, bind=0, route=0, xcp=0)
(Constructor)

source code 

Init function for Components. As components use a different auth mechanism which includes the namespace of the component. Jabberd1.4 and Ejabberd use the default namespace then for all client messages. Jabberd2 uses jabber:client. 'transport' argument is a transport name that you are going to serve (f.e. "irc.localhost"). 'port' can be specified if 'transport' resolves to correct IP. If it is not then you'll have to specify IP and port while calling "connect()". If you are going to serve several different domains with single Component instance - you must list them ALL in the 'domains' argument. For jabberd2 servers you should set typ='jabberd2' argument.

Overrides: CommonClient.__init__

connect(self, server=None, proxy=None)

source code 

This will connect to the server, and if the features tag is found then set the namespace to be jabber:client as that is required for jabberd2. 'server' and 'proxy' arguments have the same meaning as in xmpp.Client.connect()

Overrides: CommonClient.connect