|
|
|
disconnect(self,
message='
' )
Called on disconnection - disconnect callback is picked based on state of
the client. |
source code
|
|
|
connect(self,
on_connect,
on_connect_failure,
hostname=None,
port=5222,
on_proxy_failure=None,
proxy=None,
secure_tuple=( ' plain ' , None, None) )
Open XMPP connection (open XML streams in both directions) |
source code
|
|
|
|
|
|
|
|
|
_xmpp_connect(self,
socket_type=None)
Start XMPP connecting process - open the XML stream. Is called after TCP
connection is established or after switch to TLS when successfully
negotiated with <starttls>. |
source code
|
|
|
_xmpp_connect_machine(self,
mode=None,
data=None)
Finite automaton taking care of stream opening and features tag handling.
Calls _on_stream_start when stream is started, and disconnect() on
failure. |
source code
|
|
|
|
|
|
|
|
|
raise_event(self,
event_type,
data)
Raise event to connection instance. DATA_SENT and DATA_RECIVED events
are used in XML console to show XMPP traffic |
source code
|
|
|
auth(self,
user,
password,
resource='
' ,
sasl=True,
on_auth=None)
Authenticate connnection and bind resource. If resource is not provided
random one or library name used |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getRoster(self,
on_ready=None,
force=False)
Return the Roster instance, previously plugging it in and requesting
roster from server if needed |
source code
|
|
|
sendPresence(self,
jid=None,
typ=None,
requestRoster=0)
Send some specific presence state. Can also request roster from server if
according agrument is set |
source code
|
|
|
|
|
|
|
DisconnectHandler(self)
Default disconnect handler. Just raises an IOError. If you choosed to use
this class in your production client, override this method or at least
unregister it. |
source code
|
|
|
|
|
get_peerhost(self)
Gets the ip address of the account, from which is made connection to the
server (e.g. IP and port of socket) |
source code
|
|