
April 30, 2006
4:17 p.m.
Hi, I'm trying to setup a ProducerConsumerProxy between a protocols.basic.FileSender producer and a TCP Protocol transport. I have the following code: fileObj = file('test.txt','r') proxy = protocols.pcp.ProducerConsumerProxy(self.transport) producer = protocols.basic.FileSender() dd = producer.beginFileTransfer(fileObj, proxy) dd.addCallback(self.uploadDone) dd.addErrback(self.uploadError) proxy.registerProducer(producer, False) The problem is that only 16KB of data are transfered and then the transfer pauses. Also if I use BasicProducerConsumerProxy no data at all gets transfered. I think that the proxy doesn't call resumeProducing() on the FileSender producer and thats why the transfer seems to halt. Any suggestions ?