t.i.k.KQueueReactor(posixbase.PosixReactorBase) : class documentation

Part of twisted.internet.kqreactor View Source View In Hierarchy

Implements interfaces: twisted.internet.interfaces.IReactorFDSet

A reactor that uses kqueue(2)/kevent(2).
Instance Variables_kqA kqueue which will be used to check for I/O readiness.
_selectablesA dictionary mapping integer file descriptors to instances of FileDescriptor which have been registered with the reactor. All FileDescriptors which are currently receiving read or write readiness notifications will be present as values in this dictionary.
_readsA dictionary mapping integer file descriptors to arbitrary values (this is essentially a set). Keys in this dictionary will be registered with _kq for read readiness notifications which will be dispatched to the corresponding FileDescriptor instances in _selectables.
_writesA dictionary mapping integer file descriptors to arbitrary values (this is essentially a set). Keys in this dictionary will be registered with _kq for write readiness notifications which will be dispatched to the corresponding FileDescriptor instances in _selectables.
Method __init__ Initialize kqueue object, file descriptor tracking dictionaries, and the
Method addReader Add a FileDescriptor for notification of data available to read.
Method addWriter Add a FileDescriptor for notification of data available to write.
Method removeReader Remove a Selectable for notification of data available to read.
Method removeWriter Remove a Selectable for notification of data available to write.
Method removeAll Remove all selectables, and return a list of them.
Method getReaders Return the list of file descriptors currently monitored for input
Method getWriters Return the list file descriptors currently monitored for output events
Method doKEvent Poll the kqueue for new events.
Method _updateRegistration Undocumented
Method _doWriteOrRead Undocumented
def __init__(self): (source)
Initialize kqueue object, file descriptor tracking dictionaries, and the base class.
def _updateRegistration(self, *args): (source)
Undocumented
def addReader(self, reader): (source)
Add a FileDescriptor for notification of data available to read.
def addWriter(self, writer): (source)
Add a FileDescriptor for notification of data available to write.
def removeReader(self, reader): (source)
Remove a Selectable for notification of data available to read.
def removeWriter(self, writer): (source)
Remove a Selectable for notification of data available to write.
def removeAll(self): (source)
Remove all selectables, and return a list of them.
def getReaders(self): (source)
Return the list of file descriptors currently monitored for input events by the reactor.
Returnsthe list of file descriptors monitored for input events. (type: list of IReadDescriptor )
def getWriters(self): (source)
Return the list file descriptors currently monitored for output events by the reactor.
Returnsthe list of file descriptors monitored for output events. (type: list of IWriteDescriptor )
def doKEvent(self, timeout): (source)
Poll the kqueue for new events.
def _doWriteOrRead(self, selectable, fd, filter): (source)
Undocumented
API Documentation for Twisted, generated by pydoctor at 2010-07-05 15:03:32.