Part of twisted.web.iweb View Source View In Hierarchy
Objects which provide IBodyProducer 
write bytes to an object which provides IConsumer by calling 
its write method repeatedly.
IBodyProducer 
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, 
the Deferred returned from startProducing must be
fired when all bytes have been written.
IConsumer.write may synchronously invoke any of 
pauseProducing, resumeProducing, or 
stopProducing.  These methods must be implemented with this in
mind.
| Present Since | 9.0 | |
| Attribute | length | length is a int indicating how many bytes in 
total this IBodyProducer 
will write to the consumer or UNKNOWN_LENGTH if this is not 
known in advance.
 | 
  
| Method | startProducing | Start producing to the given IConsumer provider.
 | 
  
| Method | stopProducing | In addition to the standard behavior of 
IProducer.stopProducing (stop producing data), make sure the 
Deferred returned by startProducing is never 
fired.
 | 
  
Inherited from IPushProducer:
| Method | pauseProducing | Pause producing data. | 
| Method | resumeProducing | Resume producing data. | 
length is a int indicating how many bytes in 
total this IBodyProducer 
will write to the consumer or UNKNOWN_LENGTH if this is not 
known in advance.
IConsumer provider.
| Returns | A Deferred which fires with None when all 
bytes have been produced or with a Failure if there is any 
problem before all bytes have been produced.
 | |
IProducer.stopProducing (stop producing data), make sure the 
Deferred returned by startProducing is never 
fired.