t.w.h._IdentityTransferDecoder(object) : class documentation

Part of twisted.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 VariablescontentLengthCounter keeping track of how many more bytes there are to receive.
dataCallbackA one-argument callable which will be invoked each time application data is received.
finishCallbackA 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.
def __init__(self, contentLength, dataCallback, finishCallback): (source)
Undocumented
def dataReceived(self, data): (source)
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.
RaisesRuntimeErrorIf the finish callback has already been invoked during a previous call to this methood.
def noMoreData(self): (source)
All data which will be delivered to this decoder has been. Check to make sure as much data as was expected has been received.
ReturnsNone
RaisesPotentialDataLossIf the content length is unknown.
_DataLossIf the content length is known and fewer than that many bytes have been delivered.
API Documentation for Twisted, generated by pydoctor at 2011-10-27 16:27:37.