class documentation

class RemovingDescriptor: (source)

Implements interfaces: twisted.internet.interfaces.IReadDescriptor

View In Hierarchy

A read descriptor which removes itself from the reactor as soon as it gets a chance to do a read and keeps track of when its own fileno method is called.

Method __init__ Undocumented
Method connectionLost Called when the connection was lost.
Method doRead Some data is available for reading on your descriptor.
Method fileno No summary
Method logPrefix No summary
Method start Undocumented
Instance Variable calls A list of the bottom of the call stack for any call to fileno when insideReactor is false.
Instance Variable insideReactor A flag which is true as long as the reactor has this descriptor as a reader.
Instance Variable reactor Undocumented
Instance Variable read Undocumented
Instance Variable write Undocumented
def __init__(self, reactor): (source)

Undocumented

def connectionLost(self, reason): (source)

Called when the connection was lost.

This is called when the connection on a selectable object has been lost. It will be called whether the connection was closed explicitly, an exception occurred in an event handler, or the other end of the connection closed it first.

See also IHalfCloseableDescriptor if your descriptor wants to be notified separately of the two halves of the connection being closed.

Parameters
reasonA failure instance indicating the reason why the connection was lost. error.ConnectionLost and error.ConnectionDone are of special note, but the failure may be of other classes as well.
def doRead(self): (source)

Some data is available for reading on your descriptor.

Returns
If an error is encountered which causes the descriptor to no longer be valid, a Failure should be returned. Otherwise, None.
def fileno(self): (source)
Returns
The platform-specified representation of a file descriptor number. Or -1 if the descriptor no longer has a valid file descriptor number associated with it. As long as the descriptor is valid, calls to this method on a particular instance must return the same value.
def logPrefix(self): (source)
Returns
Prefix used during log formatting to indicate context.
def start(self): (source)

Undocumented

A list of the bottom of the call stack for any call to fileno when insideReactor is false.

insideReactor: bool = (source)

A flag which is true as long as the reactor has this descriptor as a reader.

Undocumented

Undocumented

Undocumented