twisted.internet.pollreactor.PollReactor(posixbase.PosixReactorBase, posixbase._PollLikeMixin)
class documentationtwisted.internet.pollreactor
View Source
(View In Hierarchy)
Implements interfaces: twisted.internet.interfaces.IReactorFDSet
A reactor that uses poll(2).
Method | __init__ | Initialize polling object, file descriptor tracking dictionaries, and the base class. |
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 | doPoll | Poll the poller for new events. |
Method | getReaders | Return the list of file descriptors currently monitored for input events by the reactor. |
Method | getWriters | Return the list file descriptors currently monitored for output events by the reactor. |
Instance Variable | _poller | A poll
which will be used to check for I/O readiness. |
Instance Variable | _selectables | A 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. |
Instance Variable | _reads | A dictionary mapping integer file descriptors to arbitrary values (this is
essentially a set). Keys in this dictionary will be registered with
_poller for read readiness notifications which will be
dispatched to the corresponding FileDescriptor
instances in _selectables . |
Instance Variable | _writes | A dictionary mapping integer file descriptors to arbitrary values (this is
essentially a set). Keys in this dictionary will be registered with
_poller for write readiness notifications which will be
dispatched to the corresponding FileDescriptor
instances in _selectables . |
Method | _updateRegistration | Register/unregister an fd with the poller. |
Method | _dictRemove | Undocumented |
Inherited from _PollLikeMixin:
Method | _doReadOrWrite | fd is available for read or write, do the work and raise errors if necessary. |
Inherited from _PollLikeMixin:
Method | _doReadOrWrite | fd is available for read or write, do the work and raise errors if necessary. |
Inherited from _PollLikeMixin:
Method | _doReadOrWrite | fd is available for read or write, do the work and raise errors if necessary. |
Inherited from _PollLikeMixin:
Method | _doReadOrWrite | fd is available for read or write, do the work and raise errors if necessary. |
Inherited from _PollLikeMixin:
Method | _doReadOrWrite | fd is available for read or write, do the work and raise errors if necessary. |
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.
_poller
for read readiness notifications which will be
dispatched to the corresponding FileDescriptor
instances in _selectables
.
_poller
for write readiness notifications which will be
dispatched to the corresponding FileDescriptor
instances in _selectables
.
Initialize polling object, file descriptor tracking dictionaries, and the base class.
Add a FileDescriptor for notification of data available to read.
Add a FileDescriptor for notification of data available to write.
Remove a Selectable for notification of data available to read.
Remove a Selectable for notification of data available to write.
Return the list of file descriptors currently monitored for input events by the reactor.
Returns | the list of file descriptors monitored for input events. (type: list of IReadDescriptor ) |
Return the list file descriptors currently monitored for output events by the reactor.
Returns | the list of file descriptors monitored for output events. (type: list of IWriteDescriptor ) |