socket timing problem

David Bolen db3l at fitlinxx.com
Thu Apr 19 20:22:05 EDT 2001


Timothy O'Malley <timo at alum.mit.edu> writes:

> Timeoutsocket was written for exactly this problem.  Check it out..
> 
>    http://www.timo-tasi.org/python/timeoutsocket.py

I was wondering - how many Windows based systems are making use of
this?  We've tried it once or twice briefly but had some problems and
held off until we had more time to look at it.  I was very interested
in using it to apply timeouts to XMLRPC calls.

Recently, one of my developers has been playing with it again, and for
example, she found that the handling of connect() under Windows wasn't
working since it returned a different result than the code expected if
you called connect() again after a non-blocking result.  The wierd
thing was that the select that that was supposed to wait until the
connect succeeded (or a timeout) was just returning immediately, even
if it hadn't finished connecting to the target machine - then the
immediate retry of the connect() was what gave an invalid parameters
result.

This is under NT4 SP4 and 6.  I noticed that a later update
incorporating changes from Alex Martelli added code for the invalid
parameter error (looks like you have 1.14 now, we were testing against
1.12), but it still looks like the fact that select() returns
instantly might be an issue - although I suppose a later timeout when
actually trying to do I/O might still work out fine.

Anyway, I'm curious if there is anyone else using it successfully
under Windows (perhaps it's an NT thing)?

--
-- David
-- 
/-----------------------------------------------------------------------\
 \               David Bolen            \   E-mail: db3l at fitlinxx.com  /
  |             FitLinxx, Inc.            \  Phone: (203) 708-5192    |
 /  860 Canal Street, Stamford, CT  06902   \  Fax: (203) 316-5150     \
\-----------------------------------------------------------------------/



More information about the Python-list mailing list