summaryrefslogtreecommitdiff
path: root/sleekxmpp/plugins/xep_0065/proxy.py
diff options
context:
space:
mode:
authorSandro Munda <sandro.munda@guardis.com>2012-06-07 19:36:25 +0200
committerSandro Munda <sandro.munda@guardis.com>2012-06-07 19:36:25 +0200
commit8def3758e4e849f25001e1e76616fcc3836bd1c2 (patch)
tree115d2434304da7985406009ba5f6cbee45748949 /sleekxmpp/plugins/xep_0065/proxy.py
parent1851ab6f5fe3548eccbc118bdb71340ee92dd9da (diff)
downloadslixmpp-8def3758e4e849f25001e1e76616fcc3836bd1c2.tar.gz
slixmpp-8def3758e4e849f25001e1e76616fcc3836bd1c2.tar.bz2
slixmpp-8def3758e4e849f25001e1e76616fcc3836bd1c2.tar.xz
slixmpp-8def3758e4e849f25001e1e76616fcc3836bd1c2.zip
Added the get_socket(sid) method to the xep_0065 plugin to retrieve
the socket of the Proxy thread.
Diffstat (limited to 'sleekxmpp/plugins/xep_0065/proxy.py')
-rw-r--r--sleekxmpp/plugins/xep_0065/proxy.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/sleekxmpp/plugins/xep_0065/proxy.py b/sleekxmpp/plugins/xep_0065/proxy.py
index 60b7d6ed..4fdd2ad8 100644
--- a/sleekxmpp/plugins/xep_0065/proxy.py
+++ b/sleekxmpp/plugins/xep_0065/proxy.py
@@ -51,6 +51,14 @@ class xep_0065(base_plugin):
StanzaPath('iq@type=result/socks/streamhost-used'),
self._handle_streamhost_used))
+ def get_socket(self, sid):
+ """ Returns the socket associated to the SID.
+ """
+
+ proxy = self.proxy_threads.get(sid)
+ if proxy:
+ return proxy.s
+
def handshake(self, to, streamer=None):
""" Starts the handshake to establish the socks5 bytestreams
connection.