summaryrefslogtreecommitdiff
path: root/slixmpp/clientxmpp.py
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2014-07-20 20:46:03 +0200
committerFlorent Le Coz <louiz@louiz.org>2014-07-20 20:46:03 +0200
commitc2f6f077762282d311a6f876f94cc1a4eb9e805f (patch)
tree935725c968da27ea1713617fa6fffcf2edbdc299 /slixmpp/clientxmpp.py
parent5ab77c745270d7d5c016c1dc7ef2a82533a4b16e (diff)
downloadslixmpp-c2f6f077762282d311a6f876f94cc1a4eb9e805f.tar.gz
slixmpp-c2f6f077762282d311a6f876f94cc1a4eb9e805f.tar.bz2
slixmpp-c2f6f077762282d311a6f876f94cc1a4eb9e805f.tar.xz
slixmpp-c2f6f077762282d311a6f876f94cc1a4eb9e805f.zip
Make xmlstream use an asyncio loop
Scheduled events, connection, TLS handshake (with STARTTLS), read and write on the socket are all done using only asyncio. A lot of threads, and thread-related (and thus useless) things still remain. This is only a first step.
Diffstat (limited to 'slixmpp/clientxmpp.py')
-rw-r--r--slixmpp/clientxmpp.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/slixmpp/clientxmpp.py b/slixmpp/clientxmpp.py
index 55c82f82..ae9010d4 100644
--- a/slixmpp/clientxmpp.py
+++ b/slixmpp/clientxmpp.py
@@ -128,8 +128,8 @@ class ClientXMPP(BaseXMPP):
def password(self, value):
self.credentials['password'] = value
- def connect(self, address=tuple(), reattempt=True,
- use_tls=True, use_ssl=False):
+ def connect(self, address=tuple(), use_ssl=False,
+ force_starttls=True, disable_starttls=False):
"""Connect to the XMPP server.
When no address is given, a SRV lookup for the server will
@@ -155,9 +155,8 @@ class ClientXMPP(BaseXMPP):
address = (self.boundjid.host, 5222)
self.dns_service = 'xmpp-client'
- return XMLStream.connect(self, address[0], address[1],
- use_tls=use_tls, use_ssl=use_ssl,
- reattempt=reattempt)
+ return XMLStream.connect(self, address[0], address[1], use_ssl=use_ssl,
+ force_starttls=force_starttls, disable_starttls=disable_starttls)
def register_feature(self, name, handler, restart=False, order=5000):
"""Register a stream feature handler.