[Twisted-Python] Re: How to detect dead client

Alvin Delagon adelagon at gmail.com
Fri Jun 6 08:38:22 EDT 2008


It's actually a setsockopt() call to enable tcp_keepalive on your
application. It's located in twisted/internet/tcp.py starting from line 431.

def getTcpKeepAlive(self):
        return operator.truth(self.socket.getsockopt(socket.SOL_SOCKET,

def setTcpKeepAlive(self, enabled):
        self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE,

Twisted uses the built-in python socket library.

Alvin Delagon

On Fri, Jun 6, 2008 at 6:55 PM, <big_tyo at inf.its-sby.edu> wrote:

> where is this tcp_keepalive_time located? is it on twisted source code or
> python library?
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20080606/894926b7/attachment.htm 

More information about the Twisted-Python mailing list