xml-rpc timeout

Jd jd at nospam.com
Fri Sep 21 14:53:34 EDT 2007


Steve Holden wrote:
> Jd wrote:
>> Hi
>>    I have a multi-threaded application. For certain operations to the
>> server, I would like to explicitly set timeout so that I get correct
>> status from the call and not timed out exception.
>>    Does anyone know how to go about doing it ?
>>
> The easiest way is to use socket.setdefaulttimeout() to establish a
> longer timeout period for all sockets, I guess. It's difficult to
> establish different timeouts for individual sockets when they aren't
> opened directly by your own code (though each socket does also have a
> method to set its timeout period).
> 
> regards
>  Steve

Ya.. the problem here is that I donot have acces to the socket. I have
written my own transport etc.. but when the socket is getting created,
there is no context for the method and where I know what method I am
going to call, I do not have access to socket.

I would have thought this to be an easy thing to achieve. In order to
make xml-rpc easy to use.. it has become difficult to control.

Anyone have any other ideas ?

/Jd



More information about the Python-list mailing list