Part of twisted.web.iweb View Source View In Hierarchy
Known implementations: twisted.web.client.FileBodyProducer
IBodyProducerwrite bytes to an object which provides
IConsumerby calling its
providers may start producing as soon as they have an
IConsumer provider. That is, they should not wait for a
resumeProducing call to begin writing data.
IConsumer.unregisterProducer must not be called. Instead,
Deferred returned from
startProducing must be
fired when all bytes have been written.
IConsumer.write may synchronously invoke any of
stopProducing. These methods must be implemented with this in
|Method||startProducing||Start producing to the given
|Method||stopProducing||In addition to the standard behavior of
Inherited from IPushProducer:
|Method||pauseProducing||Pause producing data.|
|Method||resumeProducing||Resume producing data.|
intindicating how many bytes in total this
IBodyProducerwill write to the consumer or
UNKNOWN_LENGTHif this is not known in advance.
IProducer.stopProducing(stop producing data), make sure the
startProducingis never fired.