summaryrefslogtreecommitdiff
path: root/slixmpp/plugins/xep_0065/proxy.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2015-02-12 12:21:20 +0100
committermathieui <mathieui@mathieui.net>2015-02-12 12:21:20 +0100
commit4d063e287e1bb2010d115325a3c8c6ca7c542bfc (patch)
treea8893d89d44d92e25a078a1d481152cf319b3b14 /slixmpp/plugins/xep_0065/proxy.py
parent44f02fb3ab286e80d7f82031f751b3650cb94f8b (diff)
downloadslixmpp-4d063e287e1bb2010d115325a3c8c6ca7c542bfc.tar.gz
slixmpp-4d063e287e1bb2010d115325a3c8c6ca7c542bfc.tar.bz2
slixmpp-4d063e287e1bb2010d115325a3c8c6ca7c542bfc.tar.xz
slixmpp-4d063e287e1bb2010d115325a3c8c6ca7c542bfc.zip
Remove more threaded= and block= options from the plugins
(also, correct a typo)
Diffstat (limited to 'slixmpp/plugins/xep_0065/proxy.py')
-rw-r--r--slixmpp/plugins/xep_0065/proxy.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/slixmpp/plugins/xep_0065/proxy.py b/slixmpp/plugins/xep_0065/proxy.py
index a1c2bc60..766c46cf 100644
--- a/slixmpp/plugins/xep_0065/proxy.py
+++ b/slixmpp/plugins/xep_0065/proxy.py
@@ -92,7 +92,7 @@ class XEP_0065(BasePlugin):
self.xmpp.event('stream:%s:%s' % (sid, to), socket)
return socket
- def request_stream(self, to, sid=None, ifrom=None, block=True, timeout=None, callback=None):
+ def request_stream(self, to, sid=None, ifrom=None, timeout=None, callback=None):
if sid is None:
sid = uuid4().hex
@@ -107,7 +107,7 @@ class XEP_0065(BasePlugin):
iq['socks']['sid'] = sid
for proxy, (host, port) in self._proxies.items():
iq['socks'].add_streamhost(proxy, host, port)
- return iq.send(block=block, timeout=timeout, callback=callback)
+ return iq.send(timeout=timeout, callback=callback)
def discover_proxies(self, jid=None, ifrom=None, timeout=None):
"""Auto-discover the JIDs of SOCKS5 proxies on an XMPP server."""
@@ -143,11 +143,11 @@ class XEP_0065(BasePlugin):
return self._proxies
- def get_network_address(self, proxy, ifrom=None, block=True, timeout=None, callback=None):
+ def get_network_address(self, proxy, ifrom=None, timeout=None, callback=None):
"""Get the network information of a proxy."""
iq = self.xmpp.Iq(sto=proxy, stype='get', sfrom=ifrom)
iq.enable('socks')
- return iq.send(block=block, timeout=timeout, callback=callback)
+ return iq.send(timeout=timeout, callback=callback)
def _handle_streamhost(self, iq):
"""Handle incoming SOCKS5 session request."""
@@ -187,12 +187,12 @@ class XEP_0065(BasePlugin):
self.xmpp.event('socks5_stream', conn)
self.xmpp.event('stream:%s:%s' % (sid, conn.peer_jid), conn)
- def activate(self, proxy, sid, target, ifrom=None, block=True, timeout=None, callback=None):
+ def activate(self, proxy, sid, target, ifrom=None, timeout=None, callback=None):
"""Activate the socks5 session that has been negotiated."""
iq = self.xmpp.Iq(sto=proxy, stype='set', sfrom=ifrom)
iq['socks']['sid'] = sid
iq['socks']['activate'] = target
- iq.send(block=block, timeout=timeout, callback=callback)
+ iq.send(timeout=timeout, callback=callback)
def deactivate(self, sid):
"""Closes the proxy socket associated with this SID."""