summaryrefslogtreecommitdiff
path: root/sleekxmpp
diff options
context:
space:
mode:
Diffstat (limited to 'sleekxmpp')
-rw-r--r--sleekxmpp/plugins/xep_0065/proxy.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/sleekxmpp/plugins/xep_0065/proxy.py b/sleekxmpp/plugins/xep_0065/proxy.py
index f950b6aa..60b7d6ed 100644
--- a/sleekxmpp/plugins/xep_0065/proxy.py
+++ b/sleekxmpp/plugins/xep_0065/proxy.py
@@ -214,6 +214,12 @@ class xep_0065(base_plugin):
def on_recv(self, sid, data):
""" Calls when data is recv from the Proxy socket associated
to the SID.
+
+ Triggers a socks_closed event if the socket is closed. The sid
+ is passed to this event.
+
+ Triggers a socks_recv event if there's available data. A dict
+ that contains the sid and the data is passed to this event.
"""
proxy = self.proxy_threads.get(sid)
@@ -221,7 +227,7 @@ class xep_0065(base_plugin):
if not data:
self.xmpp.event('socks_closed', sid)
else:
- self.xmpp.event('socks_recv', data)
+ self.xmpp.event('socks_recv', {'sid': sid, 'data': data})
class Proxy(Thread):