Utilities and helpers for simulating a network
| Class | TLSNegotiation | Undocumented | 
| Class | FakeAddress | The default address type for the host and peer of FakeTransportconnections. | 
| Class | FakeTransport | A wrapper around a file-like object to make it behave as a Transport. | 
| Function | makeFakeClient | Create and return a new in-memory transport hooked up to the given protocol. | 
| Function | makeFakeServer | Create and return a new in-memory transport hooked up to the given protocol. | 
| Class | IOPump | Utility to pump data between clients and servers for protocol testing. | 
| Function | connect | Create a new IOPumpconnecting 
two protocols. | 
| Function | connectedServerAndClient | Connect a given server and client class to each other. | 
| Class | ConnectionCompleter | A ConnectionCompletercan cause synthetic TCP connections established byMemoryReactor.connectTCPandMemoryReactor.listenTCPto succeed or fail. | 
| Function | connectableEndpoint | Create an endpoint that can be fired on demand. | 
| Function | _factoriesShouldConnect | Should the client and server described by the arguments be connected to each other, i.e. do their port numbers match? | 
Create and return a new in-memory transport hooked up to the given protocol.
| Parameters | clientProtocol | The client protocol to use. (type: IProtocolprovider) | 
| Returns | The transport. (type: FakeTransport) | |
Create and return a new in-memory transport hooked up to the given protocol.
| Parameters | serverProtocol | The server protocol to use. (type: IProtocolprovider) | 
| Returns | The transport. (type: FakeTransport) | |
Create a new IOPump connecting 
two protocols.
| Parameters | serverProtocol | The protocol to use on the accepting side of the connection. (type: IProtocolprovider) | 
| serverTransport | The transport to associate with serverProtocol. (type:FakeTransport) | |
| clientProtocol | The protocol to use on the initiating side of the connection. (type: IProtocolprovider) | |
| clientTransport | The transport to associate with clientProtocol. (type:FakeTransport) | |
| debug | A flag indicating whether to log information about what the IOPumpis doing. (type:bool) | |
| greet | Should the IOPumpbeflushedonce before returning to put the protocols into their post-handshake or 
post-server-greeting state? (type:bool) | |
| Returns | An IOPumpwhich 
connectsserverProtocolandclientProtocoland 
delivers bytes between them when it is pumped. (type:IOPump) | |
Connect a given server and client class to each other.
| Parameters | ServerClass | a callable that produces the server-side protocol. (type: 0-argument callable returning IProtocolprovider.) | 
| ClientClass | like ServerClassbut for the other side of the connection. (type: 0-argument callable returningIProtocolprovider.) | |
| clientTransportFactory | a callable that produces the transport which will be attached to the 
protocol returned from ClientClass. (type: callable taking (IProtocol)
and returningFakeTransport) | |
| serverTransportFactory | a callable that produces the transport which will be attached to the 
protocol returned from ServerClass. (type: callable taking (IProtocol)
and returningFakeTransport) | |
| debug | Should this dump an escaped version of all traffic on this connection to 
stdout for inspection? (type: bool) | |
| greet | Should the IOPumpbeflushedonce before returning to put the protocols into their post-handshake or 
post-server-greeting state? (type:bool) | |
| Returns | the client protocol, the server protocol, and an IOPumpwhich, when 
itspumpandflushmethods are called, will move 
data between the created client and server protocol instances. (type: 3-tupleofIProtocol,IProtocol,IOPump) | |
Should the client and server described by the arguments be connected to each other, i.e. do their port numbers match?
| Parameters | clientInfo | the args for connectTCP (type: tuple) | 
| serverInfo | the args for listenTCP (type: tuple) | |
| Returns | If they do match, return factories for the client and server that should 
connect; otherwise return None,
indicating they shouldn't be connected. (type:Noneor 2-tupleof (ClientFactory,IProtocolFactory)) | |
Create an endpoint that can be fired on demand.
| Parameters | debug | A flag; whether to dump output from the established connection to stdout. (type: bool) | 
| Returns | A client endpoint, and an object that will cause one of the Deferreds 
returned by that client endpoint. (type: 2-tupleof (IStreamClientEndpoint,ConnectionCompleter)) | |