Go to the latest version of this document.
search in docstrings

Search bar offers the following options:

- Term presence. The below example searches for documents that must contain “foo”, might contain “bar” and must not contain “baz”: `+foo bar -baz`
- Wildcards. The below example searches for documents with words beginning with “foo”: `foo*`
- Search in specific fields. The following search matches all objects in "twisted.mail" that matches “search”: `+qname:twisted.mail.* +search`

  Possible fields: 'name', 'qname' (fully qualified name), 'docstring', and 'kind'. Last two fields are only applicable if "search in docstrings" is enabled.

- Fuzzy matches. The following search matches all documents that have a word within 1 edit distance of “foo”: `foo~1`

Results provided by Lunr.js

# ``twisted`.`web`.`http`.`_IdentityTransferDecoder``

class documentation

`class _IdentityTransferDecoder: (source)`

Constructor: `_IdentityTransferDecoder(contentLength, dataCallback, finishCallback)`

View In Hierarchy

Protocol for accumulating bytes up to a specified length. This handles the case where no Transfer-Encoding is specified.

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.
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.

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.

Raises
`RuntimeError` | If 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.

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.

contentLength = (source)

Counter keeping track of how many more bytes there are to receive.

dataCallback = (source)

A one-argument callable which will be invoked each time application data is received.

finishCallback = (source)

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.