Part of twisted.web.iweb View Source View In Hierarchy
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 | No summary |
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.IProducer.stopProducing
(stop producing data), make sure the Deferred
returned by startProducing
is never fired.