class _IReactorCommon(IReactorCore, IReactorTime, IReactorFDSet, IReactorTCP, IReactorProcess): (source)
A make-believe interface supporting all the commonly-implemented parts of the reactor. For other interfaces which may or may not be supplied by the environment, i.e. IReactorSSL, adapt the reactor like IReactorSSL(reactor).
Inherited from IReactorCore:
| Method | add |
Add a function to be called when a system event occurs. |
| Method | call |
Call a function when the reactor is running. |
| Method | crash |
Stop the main loop *immediately*, without firing any system events. |
| Method | fire |
Fire a system-wide event. |
| Method | iterate |
Run the main loop's I/O polling function for a period of time. |
| Method | remove |
Removes a trigger added with addSystemEventTrigger. |
| Method | resolve |
Asynchronously resolve a hostname to a single IPv4 address. |
| Method | run |
Fire 'startup' System Events, move the reactor to the 'running' state, then run the main loop until it is stopped with stop() or crash(). |
| Method | stop |
Fire 'shutdown' System Events, which will move the reactor to the 'stopped' state and cause reactor.run() to exit. |
| Attribute | running |
A bool which is True from during startup to during shutdown and False the rest of the time. |
Inherited from IReactorTime (via IReactorCore):
| Method | call |
Call a function later. |
| Method | get |
See twisted.internet.interfaces.IReactorTime.getDelayedCalls |
| Method | seconds |
Get the current time in seconds. |
Inherited from IReactorFDSet (via IReactorCore, IReactorTime):
| Method | add |
I add reader to the set of file descriptors to get read events for. |
| Method | add |
I add writer to the set of file descriptors to get write events for. |
| Method | get |
Return the list of file descriptors currently monitored for input events by the reactor. |
| Method | get |
Return the list file descriptors currently monitored for output events by the reactor. |
| Method | remove |
Remove all readers and writers. |
| Method | remove |
Removes an object previously added with addReader. |
| Method | remove |
Removes an object previously added with addWriter. |
Inherited from IReactorTCP (via IReactorCore, IReactorTime, IReactorFDSet):
| Method | connect |
Connect a TCP client. |
| Method | listen |
Connects a given protocol factory to the given numeric TCP/IP port. |
Inherited from IReactorProcess (via IReactorCore, IReactorTime, IReactorFDSet, IReactorTCP):
| Method | spawn |
Spawn a process, with a process protocol. |