plugin pipe/stream, file transfert: refactoring and improvments:

this is a big patch as things had to be changed at the same time.

- changed methods using profile argument to use client instead
- move SatFile in a new tools.stream module, has it should be part of core, not a plugin
- new IStreamProducer interface, to handler starting a pull producer
- new FileStreamObject which create a stream producer/consumer from a SatFile
- plugin pipe is no more using unix named pipe, as it complicate the thing,
  special care need to be taken to not block, and it's generally not necessary.
  Instead a socket is now used, so the plugin has been renomed to jingle stream.
- bad connection/error should be better handler in jingle stream plugin, and code should not block anymore
- jp pipe commands have been updated accordingly

fix bug 237
This commit is contained in:
Goffi 2018-02-08 00:37:42 +01:00
commit 60b8c8fa73

View file

@ -169,7 +169,7 @@ class XEP_0363(object):
@return (tuple
"""
log.debug(u"Got upload slot: {}".format(slot))
sat_file = self.host.plugins['FILE'].File(self.host, path, size=size, auto_end_signals=False, profile=client.profile)
sat_file = self.host.plugins['FILE'].File(self.host, client, path, size=size, auto_end_signals=False)
progress_id_d.callback(sat_file.uid)
file_producer = http_client.FileBodyProducer(sat_file)
if ignore_tls_errors: