[Twisted-Python] twisted gprs

John Aherne johnaherne at rocs.co.uk
Thu Jan 10 04:52:46 EST 2008


Thanks for the info.

I have since read up on TCP and see that I am looking at standard TCP comms.

But I don't want to do anything too tricky. Just standard twisted if

I'll have to take a lok at doing my own timeouts with a callLater to see if
I get a response. If that makes sense.


John Aherne

-----Original Message-----
From: twisted-python-bounces at twistedmatrix.com
[mailto:twisted-python-bounces at twistedmatrix.com]On Behalf Of Gaspar,
Sent: 09 January 2008 22:55
To: Twisted general discussion
Subject: RE: [Twisted-Python] twisted gprs

>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).


Twisted-Python mailing list
Twisted-Python at twistedmatrix.com

More information about the Twisted-Python mailing list