[Twisted-Python] twisted gprs

Gaspar, Carson Carson.Gaspar at gs.com
Wed Jan 9 17:55:09 EST 2008

>What I would like to be able to do is to not wait 2-7 minutes 
>before realising the connection is not working.
>I have been through the docs and the api but can't find 
>anything that I can use.
>Is there any call I can make use of to be able to detect the 
>failed send before the connection finally is broken.

I assume this is TCP. What you're seeing is TCP in action. You send data
until you fill the TCP window, then the kernel queues the data, then TCP
times out.

If you want a faster timeout, you'll need to add application level ACKs,
and add a timeout on those, or tune your kernel to have shorter TCP

You _may_ be able to call getsockopt() and check the outgoing buffer
size to determine that there is unsent data, but I don't think you can
detect unack'd data (if anyone knows a way, please speak up).


More information about the Twisted-Python mailing list