comparison src/plugins/plugin_xep_0065.py @ 1569:44854fb5d3b2

plugin XEP-0065: fixed CHUNK_SIZE to 4096 to avoid wild disconnection by some proxies (Prosody's proxy65 disconnect if it receive bigger chunks)
author Goffi <goffi@goffi.org>
date Sun, 08 Nov 2015 14:44:33 +0100
parents 7cc29634b6ef
children 37d4be4a9fed
comparison
equal deleted inserted replaced
1568:1f7a34d499e0 1569:44854fb5d3b2
271 """ 271 """
272 return hashlib.sha1((sid + from_jid.full() + to_jid.full()).encode('utf-8')).hexdigest() 272 return hashlib.sha1((sid + from_jid.full() + to_jid.full()).encode('utf-8')).hexdigest()
273 273
274 274
275 class SOCKSv5(protocol.Protocol, FileSender): 275 class SOCKSv5(protocol.Protocol, FileSender):
276 CHUNK_SIZE = 4096
276 277
277 def __init__(self, session_hash=None): 278 def __init__(self, session_hash=None):
278 """ 279 """
279 @param session_hash(str): hash of the session 280 @param session_hash(str): hash of the session
280 must only be used in client mode 281 must only be used in client mode