[Twisted-Python] Pulling the ethernet cable out

Alvin Delagon adelagon at gmail.com
Tue Feb 16 12:19:10 EST 2010


Hello,

No, getTcpKeepAlive will only tell you if SO_KEEPALIVE is enabled. It's
setTcpKeepAlive you want. If it's enabled, once the keepalive times out on a
half-open scenario, the connectionLost method will be triggered. You can
read the API docs here:

http://twistedmatrix.com/documents/8.2.0/api/twisted.internet.tcp.Connection.html#getTcpKeepAlive
http://twistedmatrix.com/documents/8.2.0/api/twisted.internet.tcp.Connection.html#setTcpKeepAlive

Best Regards,
Alvin


On Wed, Feb 17, 2010 at 1:06 AM, gary clark <burslem2001 at yahoo.com> wrote:

> I have to poll at the twisted server "getTcpKeepAlive" for the state of the
> keep alive.
>
>
> Thanks,
> Garyc
>
> --- On Tue, 2/16/10, gary clark <burslem2001 at yahoo.com> wrote:
>
> > From: gary clark <burslem2001 at yahoo.com>
> > Subject: [Twisted-Python] Pulling the ethernet cable out
> > To: "Twisted general discussion" <twisted-python at twistedmatrix.com>
> > Date: Tuesday, February 16, 2010, 10:15 AM
> > Hello,
> >
> > I'm tested my client server model. The server being a
> > twisted server.
> > I am using the class NetstringReceiver. When I close down
> > the client the appropriate call to close the connection is
> > made "connectionLost". However when I just pull the client
> > connection cable from the network. I would expect the call
> > to be made to indicate a connection is lost at the twisted
> > server. I dont see this.
> >
> > I am going through a local hub and not sure what at the
> > moment to think of this. I am using ssl to communicate.
> >
> > If somebody could shed some light on this that would be
> > great.
> >
> > Thanks,
> > Garyc
> >
> >
> >
> >
> > _______________________________________________
> > Twisted-Python mailing list
> > Twisted-Python at twistedmatrix.com
> > http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
> >
>
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>



-- 
http://www.alvinatorsplayground.blogspot.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20100217/673ef14b/attachment.htm 


More information about the Twisted-Python mailing list