This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author loewis
Recipients khiltd, loewis
Date 2008-02-17.20:19:36
SpamBayes Score 0.028640823
Marked as misclassified No
Message-id <1203279578.0.0.361998319022.issue2132@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2008-02-17 20:19:38loewissetspambayes_score: 0.0286408 -> 0.028640823
recipients: + loewis, khiltd
2008-02-17 20:19:38loewissetspambayes_score: 0.0286408 -> 0.0286408
messageid: <1203279578.0.0.361998319022.issue2132@psf.upfronthosting.co.za>
2008-02-17 20:19:37loewislinkissue2132 messages
2008-02-17 20:19:36loewiscreate