Martin v. Löwis added the comment: I recommend that you stay with non-blocking sockets, and use select/poll on all sockets. Then you can simultaneously check multiple servers, and select will tell you which ones you got connected to. For this application, putting a time-out on the socket and doing the connections sequentially seems unreasonable - that's exactly what select was invented for.
I don't understand the "setting a timeout ... is not entirely what I want, either" remark. The only way to specify a timeout for connect *is* to set it into non-blocking mode. I'm sure PHP does the same. If you want to see timeouts for smtplib, a work-around is to set a global timeout for all sockets, through socket.setdefaulttimeout. This will transparently apply to smtplib as well. ---------- nosy: +loewis __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2132> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com