twisted.web.http._IdentityTransferDecoder(object)
class documentationtwisted.web.http
View Source
(View In Hierarchy)
Protocol for accumulating bytes up to a specified length. This handles the case where no Transfer-Encoding is specified.
Instance Variable | contentLength | Counter keeping track of how many more bytes there are to receive. |
Instance Variable | dataCallback | A one-argument callable which will be invoked each time application data is received. |
Instance Variable | finishCallback | A one-argument callable which will be invoked when the terminal chunk is received. It will be invoked with all bytes which were delivered to this protocol which came after the terminal chunk. |
Method | __init__ | Undocumented |
Method | dataReceived | Interpret the next chunk of bytes received. Either deliver them to the data callback or invoke the finish callback if enough bytes have been received. |
Method | noMoreData | All data which will be delivered to this decoder has been. Check to make sure as much data as was expected has been received. |
Interpret the next chunk of bytes received. Either deliver them to the data callback or invoke the finish callback if enough bytes have been received.
Raises | RuntimeError | If the finish callback has already been invoked during a previous call to this methood. |
All data which will be delivered to this decoder has been. Check to make sure as much data as was expected has been received.
Returns | None | |
Raises | PotentialDataLoss | If the content length is unknown. |
_DataLoss | If the content length is known and fewer than that many bytes have been delivered. |