Class t.i.i.a.FileHandle(log.Logger, styles.Ephemeral, object):

Part of twisted.internet.iocpreactor.abstract View Source View In Hierarchy

Implements interfaces: twisted.internet.interfaces.IConsumer, twisted.internet.interfaces.IHalfCloseableDescriptor, twisted.internet.interfaces.IProducer, twisted.internet.interfaces.ITransport

File handle that can read and write asynchronously

Split Table into Classes Show Methods in One Table

Line # Kind Name Docs
39 Method startReading Undocumented
47 Method stopReading Undocumented
124 Method doRead Undocumented
143 Method readFromHandle Undocumented
147 Method dataReceived Undocumented
151 Method readConnectionLost Indicates read connection was lost.
166 Method loseWriteConnection Undocumented
176 Method writeConnectionLost Indicates write connection was lost.
181 Method startWriting Undocumented
189 Method stopWriting Undocumented
246 Method doWrite Undocumented
276 Method writeToHandle Undocumented
280 Method write Reliably write some data.
300 Method writeSequence Write a list of strings to the physical connection.
324 Method __init__ Undocumented
333 Method connectionLost The connection was lost.
355 Method getFileHandle Undocumented
359 Method loseConnection Close the connection at the next available opportunity.
397 Method registerProducer Register to receive data from a producer.
421 Method unregisterProducer Stop consuming data from a producer, without disconnecting.
428 Method stopConsuming Stop consuming data.
442 Method resumeProducing Undocumented
447 Method pauseProducing Undocumented
451 Method stopProducing Stop producing data.
54 Method _resumeReading Undocumented
60 Method _dispatchData Dispatch previously read data. Return True if self.reading and we don't
93 Method _cbRead Undocumented
99 Method _handleRead Returns False if we should stop reading for now
171 Method _closeWriteConnection Undocumented
196 Method _resumeWriting Undocumented
201 Method _cbWrite Undocumented
206 Method _handleWrite Returns false if we should stop writing for now

Inherited from Logger:

Line # Kind Name Docs
201 Method logPrefix Override this method to insert custom logging behavior. Its

Inherited from Ephemeral:

Line # Kind Name Docs
124 Method __getstate__ Undocumented
131 Method __setstate__ Undocumented
Line # Kind Name Docs
124 Method __getstate__ Undocumented
324 Method __init__ Undocumented
131 Method __setstate__ Undocumented
333 Method connectionLost The connection was lost.
147 Method dataReceived Undocumented
124 Method doRead Undocumented
246 Method doWrite Undocumented
355 Method getFileHandle Undocumented
201 Method logPrefix Override this method to insert custom logging behavior. Its
359 Method loseConnection Close the connection at the next available opportunity.
166 Method loseWriteConnection Undocumented
447 Method pauseProducing Undocumented
151 Method readConnectionLost Indicates read connection was lost.
143 Method readFromHandle Undocumented
397 Method registerProducer Register to receive data from a producer.
442 Method resumeProducing Undocumented
39 Method startReading Undocumented
181 Method startWriting Undocumented
428 Method stopConsuming Stop consuming data.
451 Method stopProducing Stop producing data.
47 Method stopReading Undocumented
189 Method stopWriting Undocumented
421 Method unregisterProducer Stop consuming data from a producer, without disconnecting.
280 Method write Reliably write some data.
176 Method writeConnectionLost Indicates write connection was lost.
300 Method writeSequence Write a list of strings to the physical connection.
276 Method writeToHandle Undocumented
93 Method _cbRead Undocumented
201 Method _cbWrite Undocumented
171 Method _closeWriteConnection Undocumented
60 Method _dispatchData Dispatch previously read data. Return True if self.reading and we don't
99 Method _handleRead Returns False if we should stop reading for now
206 Method _handleWrite Returns false if we should stop writing for now
54 Method _resumeReading Undocumented
196 Method _resumeWriting Undocumented
def startReading(self): (source)
Undocumented
def stopReading(self): (source)
Undocumented
def _resumeReading(self): (source)
Undocumented
def _dispatchData(self): (source)
Dispatch previously read data. Return True if self.reading and we don't have any more data
def _cbRead(self, rc, bytes, evt): (source)
Undocumented
def _handleRead(self, rc, bytes, evt): (source)
Returns False if we should stop reading for now
def doRead(self): (source)
Undocumented
def readFromHandle(self, bufflist, evt): (source)
Undocumented
def dataReceived(self, data): (source)
Undocumented
def readConnectionLost(self, reason): (source)
Indicates read connection was lost.
def loseWriteConnection(self): (source)
Undocumented
def _closeWriteConnection(self): (source)
Undocumented
def writeConnectionLost(self, reason): (source)
Indicates write connection was lost.
def startWriting(self): (source)
Undocumented
def stopWriting(self): (source)
Undocumented
def _resumeWriting(self): (source)
Undocumented
def _cbWrite(self, rc, bytes, evt): (source)
Undocumented
def _handleWrite(self, rc, bytes, evt): (source)
Returns false if we should stop writing for now
def doWrite(self): (source)
Undocumented
def writeToHandle(self, buff, evt): (source)
Undocumented
def write(self, data): (source)

Reliably write some data.

The data is buffered until his file descriptor is ready for writing.
def writeSequence(self, iovec): (source)

Write a list of strings to the physical connection.

If possible, make sure that all of the data is written to the socket at once, without first copying it all into a single string.
def __init__(self, reactor=None): (source)
Undocumented
def connectionLost(self, reason): (source)

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.

Clean up state here, but make sure to call back up to FileDescriptor.
def getFileHandle(self): (source)
Undocumented
def loseConnection(self, _connDone=failure.Failure(main.CONNECTION_DONE)): (source)

Close the connection at the next available opportunity.

Call this to cause this FileDescriptor to lose its connection. It will first write any data that it has buffered.

If there is data buffered yet to be written, this method will cause the transport to lose its connection as soon as it's done flushing its write buffer. If you have a producer registered, the connection won't be closed until the producer is finished. Therefore, make sure you unregister your producer when it's finished, or the connection will never close.
def registerProducer(self, producer, streaming): (source)

Register to receive data from a producer.

This sets this selectable to be a consumer for a producer. When this selectable runs out of data on a write() call, it will ask the producer to resumeProducing(). A producer should implement the IProducer interface.

FileDescriptor provides some infrastructure for producer methods.
def unregisterProducer(self): (source)
Stop consuming data from a producer, without disconnecting.
def stopConsuming(self): (source)

Stop consuming data.

This is called when a producer has lost its connection, to tell the consumer to go lose its connection (and break potential circular references).
def resumeProducing(self): (source)
Undocumented
def pauseProducing(self): (source)
Undocumented
def stopProducing(self): (source)

Stop producing data.

This tells a producer that its consumer has died, so it must stop producing data for good.
API Documentation for Twisted, generated by pydoctor at 2008-10-26 16:12:37.