[Twisted-web] mental block on agent.request response timeout

John Aherne johnaherne at rocs.co.uk
Fri Jul 1 04:42:13 EDT 2011

I've spent some time going through the code for _newclient.py with the
of the changes for 4330.

I have been trying to find a way to incorporate checking for no response
from an agent.request
I am using the sample code of response.py in the ''using web client' howto
in the twisted docs as a simple basis to do some testing

I have set up a test server that will not respond for a given time so I can
see what my request will do.

What I can't do is work out where on the request deferred I add my callback
the _canceller method in http11clientprotocol in _newclient. Or have I got
that completely wrong.

Nor how I can then call this canceller method on the callback to get it to
if the timeout has been exceeded

It seems that the agent.request wraps the http11 Request so I am unclear
where things are happening

I'm a bit stuck .And I think  I'm missing the obvious in some way.

If someone has an example of how I might setup the calls I would be very
happy to see it.

Thanks for any info.

John Aherne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-web/attachments/20110701/942464b9/attachment.htm 

More information about the Twisted-web mailing list