Module t.p.loopback

Part of twisted.protocols View Source

Testing support for protocols -- loopback between client and server.
Class _LoopbackQueue Trivial wrapper around a list to give it an interface like a queue, which
Class _LoopbackAddress Undocumented
Class _LoopbackTransport No class docstring; 7/9 methods documented
Function loopbackAsync Establish a connection between server and client then transfer data
Function _loopbackAsyncBody Transfer bytes from the output queue of each protocol to the input of the other.
Function _loopbackAsyncContinue Undocumented
Class LoopbackRelay No class docstring; 7/10 methods documented
Function loopback Run session between server and client.
Class LoopbackClientFactory No class docstring; 2/3 methods documented
Class _FireOnClose No class docstring; 1/2 methods documented
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.
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.