Implements interfaces: twisted.internet.interfaces.IReactorFDSet, twisted.internet.interfaces.IReactorWin32Events

Reactor that uses Win32 event APIs.

Method __init__ Undocumented
Method addEvent Add a new win32 event to the event loop.
Method removeEvent Remove an event.
Method addReader Add a socket FileDescriptor for notification of data available to read.
Method addWriter Add a socket 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 events by the reactor.
Method getWriters Return the list file descriptors currently monitored for output events by the reactor.
Method doWaitForMultipleEvents Undocumented
Instance Variable _reads A dictionary mapping FileDescriptor instances to a win32 event object used to check for read events for that descriptor.
Instance Variable _writes A dictionary mapping FileDescriptor instances to a arbitrary value. Keys in this dictionary will be given a chance to write out their data.
Instance Variable _events A dictionary mapping win32 event object to tuples of FileDescriptor instances and event masks.
Instance Variable _closedAndReading Along with _closedAndNotReading, keeps track of descriptors which have had close notification delivered from the OS but which we have not finished reading data from. MsgWaitForMultipleObjects will only deliver close notification to us once, so we remember it in these two dictionaries until we're ready to act on it. The OS has delivered close notification for each descriptor in this dictionary, and the descriptors are marked as allowed to handle read events in the reactor, so they can be processed. When a descriptor is marked as not allowed to handle read events in the reactor (ie, it is passed to IReactorFDSet.removeReader), it is moved out of this dictionary and into _closedAndNotReading. The descriptors are keys in this dictionary. The values are arbitrary. (type: dict)
Instance Variable _closedAndNotReading These descriptors have had close notification delivered from the OS, but are not marked as allowed to handle read events in the reactor. They are saved here to record their closed state, but not processed at all. When one of these descriptors is passed to IReactorFDSet.addReader, it is moved out of this dictionary and into _closedAndReading. The descriptors are keys in this dictionary. The values are arbitrary. This is a weak key dictionary so that if an application tells the reactor to stop reading from a descriptor and then forgets about that descriptor itself, the reactor will also forget about it. (type: WeakKeyDictionary)
Method _makeSocketEvent Make a win32 event object for a socket.
Method _runWrite Undocumented
Method _runAction Undocumented

Inherited from PluggableResolverMixin (via PosixReactorBase, ReactorBase):

Instance Variable resolver The installed IResolverSimple.
Method installResolver See IReactorPluggableResolver.
Method installNameResolver See IReactorPluggableNameResolver.
Method nameResolver Implementation of read-only IReactorPluggableNameResolver.nameResolver.
Instance Variable _nameResolver The installed IHostnameResolver.

Inherited from PluggableResolverMixin (via PosixReactorBase, ReactorBase):

Instance Variable resolver The installed IResolverSimple.
Method installResolver See IReactorPluggableResolver.
Method installNameResolver See IReactorPluggableNameResolver.
Method nameResolver Implementation of read-only IReactorPluggableNameResolver.nameResolver.
Instance Variable _nameResolver The installed IHostnameResolver.

Inherited from PluggableResolverMixin (via PosixReactorBase, ReactorBase):

Instance Variable resolver The installed IResolverSimple.
Method installResolver See IReactorPluggableResolver.
Method installNameResolver See IReactorPluggableNameResolver.
Method nameResolver Implementation of read-only IReactorPluggableNameResolver.nameResolver.
Instance Variable _nameResolver The installed IHostnameResolver.

Inherited from PluggableResolverMixin (via PosixReactorBase, ReactorBase):

Instance Variable resolver The installed IResolverSimple.
Method installResolver See IReactorPluggableResolver.
Method installNameResolver See IReactorPluggableNameResolver.
Method nameResolver Implementation of read-only IReactorPluggableNameResolver.nameResolver.
Instance Variable _nameResolver The installed IHostnameResolver.

Inherited from PluggableResolverMixin (via PosixReactorBase, ReactorBase):

Instance Variable resolver The installed IResolverSimple.
Method installResolver See IReactorPluggableResolver.
Method installNameResolver See IReactorPluggableNameResolver.
Method nameResolver Implementation of read-only IReactorPluggableNameResolver.nameResolver.
Instance Variable _nameResolver The installed IHostnameResolver.
_reads =
A dictionary mapping FileDescriptor instances to a win32 event object used to check for read events for that descriptor.
_writes =
A dictionary mapping FileDescriptor instances to a arbitrary value. Keys in this dictionary will be given a chance to write out their data.
_events =
A dictionary mapping win32 event object to tuples of FileDescriptor instances and event masks.
_closedAndReading =
Along with _closedAndNotReading, keeps track of descriptors which have had close notification delivered from the OS but which we have not finished reading data from. MsgWaitForMultipleObjects will only deliver close notification to us once, so we remember it in these two dictionaries until we're ready to act on it. The OS has delivered close notification for each descriptor in this dictionary, and the descriptors are marked as allowed to handle read events in the reactor, so they can be processed. When a descriptor is marked as not allowed to handle read events in the reactor (ie, it is passed to IReactorFDSet.removeReader), it is moved out of this dictionary and into _closedAndNotReading. The descriptors are keys in this dictionary. The values are arbitrary. (type: dict)
_closedAndNotReading =
These descriptors have had close notification delivered from the OS, but are not marked as allowed to handle read events in the reactor. They are saved here to record their closed state, but not processed at all. When one of these descriptors is passed to IReactorFDSet.addReader, it is moved out of this dictionary and into _closedAndReading. The descriptors are keys in this dictionary. The values are arbitrary. This is a weak key dictionary so that if an application tells the reactor to stop reading from a descriptor and then forgets about that descriptor itself, the reactor will also forget about it. (type: WeakKeyDictionary)
def __init__(self): (source)
def _makeSocketEvent(self, fd, action, why): (source)

Make a win32 event object for a socket.

def addEvent(self, event, fd, action): (source)

Add a new win32 event to the event loop.

def removeEvent(self, event): (source)
def addReader(self, reader): (source)

Add a socket FileDescriptor for notification of data available to read.

def addWriter(self, writer): (source)

Add a socket 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 doWaitForMultipleEvents(self, timeout): (source)
Undocumented
def _runWrite(self, fd): (source)
Undocumented
def _runAction(self, action, fd): (source)
Undocumented
API Documentation for Twisted, generated by pydoctor at 2019-08-06 12:10:50.