t.p.loopback : module documentation

Part of twisted.protocols View Source

Testing support for protocols -- loopback between client and server.
Function loopbackAsync Establish a connection between server and client then transfer data between them until the connection is closed. This is often useful for testing a protocol.
Class LoopbackRelay Undocumented
Function loopback Run session between server and client. DEPRECATED in Twisted 2.5. Use loopbackAsync instead.
Class LoopbackClientFactory Undocumented
Function loopbackTCP Run session between server and client protocol instances over TCP.
Function loopbackUNIX Run session between server and client protocol instances over UNIX socket.
Class _LoopbackQueue Trivial wrapper around a list to give it an interface like a queue, which the addition of also sending notifications by way of a Deferred whenever the list has something added to it.
Class _LoopbackAddress Undocumented
Class _LoopbackTransport Undocumented
Function _loopbackAsyncBody Transfer bytes from the output queue of each protocol to the input of the other.
Function _loopbackAsyncContinue Undocumented
Class _FireOnClose Undocumented
def loopbackAsync(server, client): (source)
Establish a connection between server and client then transfer data between them until the connection is closed. This is often useful for testing a protocol.
ParametersserverThe protocol instance representing the server-side of this connection.
clientThe protocol instance representing the client-side of this connection.
ReturnsA Deferred which fires when the connection has been closed and both sides have received notification of this.
def _loopbackAsyncBody(server, serverToClient, client, clientToServer): (source)
Transfer bytes from the output queue of each protocol to the input of the other.
ParametersserverThe protocol instance representing the server-side of this connection.
serverToClientThe _LoopbackQueue holding the server's output.
clientThe protocol instance representing the client-side of this connection.
clientToServerThe _LoopbackQueue holding the client's output.
ReturnsA Deferred which fires when the connection has been closed and both sides have received notification of this.
def _loopbackAsyncContinue(ignored, server, serverToClient, client, clientToServer): (source)
Undocumented
def loopback(server, client, logFile=None): (source)
Run session between server and client. DEPRECATED in Twisted 2.5. Use loopbackAsync instead.
def loopbackTCP(server, client, port=0, noisy=True): (source)
Run session between server and client protocol instances over TCP.
def loopbackUNIX(server, client, noisy=True): (source)
Run session between server and client protocol instances over UNIX socket.
API Documentation for Twisted, generated by pydoctor at 2011-10-27 16:02:37.