t.p.b._RecvdCompatHack(object) : class documentation

Part of twisted.protocols.basic View Source View In Hierarchy

Emulates the to-be-deprecated IntNStringReceiver.recvd attribute.

The recvd attribute was where the working buffer for buffering and parsing netstrings was kept. It was updated each time new data arrived and each time some of that data was parsed and delivered to application code. The piecemeal updates to its string value were expensive and have been removed from IntNStringReceiver in the normal case. However, for applications directly reading this attribute, this descriptor restores that behavior. It only copies the working buffer when necessary (ie, when accessed). This avoids the cost for applications not using the data.

This is a custom descriptor rather than a property, because we still need the default __set__ behavior in both new-style and old-style subclasses.

Method __get__ Undocumented
def __get__(self, oself, type=None): (source)
API Documentation for Twisted, generated by pydoctor at 2012-12-26 12:18:15.