class documentation
class MemoryReactor(Clock): (source)
Implements interfaces: twisted.internet.interfaces.IReactorUDP
An IReactorTime
and IReactorUDP
provider.
Time is controlled deterministically via the base class, Clock
. UDP is handled in-memory by connecting protocols to instances of MemoryDatagramTransport
.
Method | __init__ |
Undocumented |
Method | listen |
Pretend to bind a UDP port and connect the given protocol to it. |
Instance Variable | udp |
A dict mapping port numbers to instances of MemoryDatagramTransport . |
Inherited from Clock
:
Method | advance |
Move time on this clock forward by the given amount and run whatever pending calls should be run. |
Method | call |
See twisted.internet.interfaces.IReactorTime.callLater . |
Method | get |
See twisted.internet.interfaces.IReactorTime.getDelayedCalls |
Method | pump |
Advance incrementally by the given set of times. |
Method | seconds |
Pretend to be time.time(). This is used internally when an operation such as IDelayedCall.reset needs to determine a time value relative to the current time. |
Class Variable | right |
Undocumented |
Instance Variable | calls |
Undocumented |
Method | _sort |
Sort the pending calls according to the time they are scheduled. |