twisted.test.iosim.ConnectionCompleter(object)
class documentationtwisted.test.iosim
(View In Hierarchy)
A ConnectionCompleter
can cause synthetic TCP connections established by MemoryReactor.connectTCP
and MemoryReactor.listenTCP
to succeed or fail.
Method | __init__ | Create a ConnectionCompleter
from a MemoryReactor . |
Method | succeedOnce | Complete a single TCP connection established on this ConnectionCompleter 's
MemoryReactor . |
Method | failOnce | Fail a single TCP connection established on this ConnectionCompleter 's
MemoryReactor . |
Create a ConnectionCompleter
from a MemoryReactor
.
Parameters | memoryReactor | The reactor to attach to. (type: MemoryReactor ) |
Complete a single TCP connection established on this ConnectionCompleter
's
MemoryReactor
.
Parameters | debug | A flag; whether to dump output from the established connection to stdout. (type: bool ) |
Returns | a pump for the connection, or None
if no connection could be established. (type: IOPump or None ) |
Fail a single TCP connection established on this ConnectionCompleter
's
MemoryReactor
.
Parameters | reason | the reason to provide that the connection failed. (type: Failure ) |