twisted.web._newclient.LengthEnforcingConsumer class documentationtwisted.web._newclient
(View In Hierarchy)
An IConsumer
proxy which enforces an exact length requirement on the total data written 
to it.
| Method | __init__ | Undocumented | 
| Method | write | Write bytesto the underlying consumer unless_noMoreWritesExpectedhas been called or there are/have been 
too many bytes. | 
| Instance Variable | _length | The number of bytes remaining to be written. | 
| Instance Variable | _producer | The IBodyProducerwhich is writing to this consumer. | 
| Instance Variable | _consumer | The consumer to which at most _lengthbytes will be forwarded. | 
| Instance Variable | _finished | A Deferredwhich will be fired with aFailureif too 
many bytes are written to this consumer. | 
| Method | _allowNoMoreWrites | Indicate that no additional writes are allowed. Attempts to write after calling this method will be met with an exception. | 
| Method | _noMoreWritesExpected | Called to indicate no more bytes will be written to this consumer. Check to see that the correct number have been written. | 
Indicate that no additional writes are allowed. Attempts to write after calling this method will be met with an exception.