Added the get_socket(sid) method to the xep_0065 plugin to retrieve
the socket of the Proxy thread.
This commit is contained in:
parent
1851ab6f5f
commit
8def3758e4
@ -51,6 +51,14 @@ class xep_0065(base_plugin):
|
|||||||
StanzaPath('iq@type=result/socks/streamhost-used'),
|
StanzaPath('iq@type=result/socks/streamhost-used'),
|
||||||
self._handle_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):
|
def handshake(self, to, streamer=None):
|
||||||
""" Starts the handshake to establish the socks5 bytestreams
|
""" Starts the handshake to establish the socks5 bytestreams
|
||||||
connection.
|
connection.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user