[Twisted-Python] Problems with long term connections?

Thomas Hervé therve at free.fr
Thu Feb 15 10:13:58 EST 2007


Quoting Thomas Jacob <jacob at internet24.de>:

> I would implement some sort of keep-alive mechanism
> for those connections, something that will periodically do
> some sort of ping/pong sequence (possibly even
> using TCP's keepalive feature if that is available, anyone
> know if Twisted can request it on at least some platforms?).

Here is documented the setTcpKeepAlive method:
http://twistedmatrix.com/documents/current/api/twisted.internet.interfaces.ITCPTransport.html

Generally you can enable it in the connectionMade of your protocol.

-- 
Thomas





More information about the Twisted-Python mailing list