Known implementations: twisted.internet._glibbase.GlibReactorBase, twisted.internet._threadedselect.ThreadedSelectReactor, twisted.internet.asyncioreactor.AsyncioSelectorReactor, twisted.internet.cfreactor.CFReactor, twisted.internet.epollreactor.EPollReactor, twisted.internet.kqreactor.KQueueReactor, twisted.internet.pollreactor.PollReactor, twisted.internet.posixbase._ContinuousPolling, twisted.internet.selectreactor.SelectReactor, twisted.internet.test.test_tcp._FakeFDSetReactor, twisted.internet.testing.MemoryReactor, twisted.internet.win32eventreactor.Win32Reactor, twisted.pair.test.test_tuntap.ReactorFDSet

Implement me to be able to use IFileDescriptor type resources.

This assumes that your main-loop uses UNIX-style numeric file descriptors (or at least similarly opaque IDs returned from a .fileno() method)

Method addReader I add reader to the set of file descriptors to get read events for.
Method addWriter I add writer to the set of file descriptors to get write events for.
Method removeReader Removes an object previously added with addReader.
Method removeWriter Removes an object previously added with addWriter.
Method removeAll Remove all readers and writers.
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.
def addReader(reader):

I add reader to the set of file descriptors to get read events for.

ParametersreaderAn IReadDescriptor provider that will be checked for read events until it is removed from the reactor with removeReader.
ReturnsNone.
def addWriter(writer):

I add writer to the set of file descriptors to get write events for.

ParameterswriterAn IWriteDescriptor provider that will be checked for write events until it is removed from the reactor with removeWriter.
ReturnsNone.
def removeReader(reader):

Removes an object previously added with addReader.

ReturnsNone.
def removeWriter(writer):

Removes an object previously added with addWriter.

ReturnsNone.
def removeAll():

Remove all readers and writers.

Should not remove reactor internal reactor connections (like a waker).

ReturnsA list of IReadDescriptor and IWriteDescriptor providers which were removed.
def getReaders():

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():

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)
API Documentation for twisted, generated by pydoctor at 2020-03-25 17:34:30.