[Twisted-Python] Automatic reconnection

Itamar Shtull-Trauring twisted at itamarst.org
Mon Mar 11 20:53:38 EST 2002

Andrew Bennetts wrote:

> I need a tcp.Client that can automatically reconnect when disconnected.

tcp.Connector, or app.connectTCP.

e.g., given MyProtocol and Application instance app:

from twisted.protocols import protocol

# make protocol factory for MyProtocol
f = protocol.ClientFactory()
f.protocol = MyProtocol

app.connectTCP("www.yahoo.com", 80, f)

More information about the Twisted-Python mailing list